@Override public JBBPFieldShort getElementAt(final int index) { final JBBPFieldShort result = new JBBPFieldShort(this.fieldNameInfo, this.array[index]); result.payload = this.payload; return result; }
@Override public long getAsLong() { return this.getAsInt(); }
@Override public long getAsInvertedBitOrder() { return reverseBits(this.value); }
@Override public Object getValueArrayAsObject(final boolean reverseBits) { final short[] result; if (reverseBits) { result = this.array.clone(); for (int i = 0; i < result.length; i++) { result[i] = (short) JBBPFieldShort.reverseBits(result[i]); } } else { result = this.array.clone(); } return result; }
if (arrayLength < 0) { final int value = inStream.readUnsignedShort(byteOrder); singleAtomicField = new JBBPFieldShort(name, (short) value); } else { structureFields.add(new JBBPFieldArrayShort(name, inStream.readShortArray(wholeStreamArray ? -1 : arrayLength, byteOrder)));
/** * Write codes of chars as 16 bit values into the stream. * * @param str the string which chars will be written, must not be null * @param bitOrder the bit outOrder * @return the DSL session * @throws IOException it will be thrown for transport errors * @since 1.1 */ public JBBPOut Short(final String str, final JBBPBitOrder bitOrder) throws IOException { assertNotEnded(); if (this.processCommands) { final boolean msb0 = bitOrder == JBBPBitOrder.MSB0; for (int i = 0; i < str.length(); i++) { short value = (short) str.charAt(i); if (msb0) { value = (short) JBBPFieldShort.reverseBits(value); } _writeShort(value); } } return this; }
value = (short) JBBPFieldShort.reverseBits(value); short value = (short) str.charAt(i); if (reverseBits) { value = (short) JBBPFieldShort.reverseBits(value); short value = (short) ((Character) Array.get(array, i)).charValue(); if (reverseBits) { value = (short) JBBPFieldShort.reverseBits(value); short value = ((Number) Array.get(array, i)).shortValue(); if (reverseBits) { value = (short) JBBPFieldShort.reverseBits(value);