short r = segment.getShortBigEndian(pos); assertEquals(val, Short.reverseBytes(r));
@Override protected short _getShort(int index) { return memorySegment.getShortBigEndian(index); }
@Override public final int readUnsignedShort() throws IOException { final int v = this.segment.getShortBigEndian(this.position) & 0xffff; this.position += 2; return v; }
@Override public final short readShort() throws IOException { final short v = this.segment.getShortBigEndian(this.position); this.position += 2; return v; }
@Override public final int readUnsignedShort() throws IOException { final int v = this.segment.getShortBigEndian(this.position) & 0xffff; this.position += 2; return v; }
@Override public final short readShort() throws IOException { final short v = this.segment.getShortBigEndian(this.position); this.position += 2; return v; }
@Override public final int readUnsignedShort() throws IOException { final int v = this.segment.getShortBigEndian(this.position) & 0xffff; this.position += 2; return v; }
@Override public final int readUnsignedShort() throws IOException { final int v = this.segment.getShortBigEndian(this.position) & 0xffff; this.position += 2; return v; }
@Override public final short readShort() throws IOException { final short v = this.segment.getShortBigEndian(this.position); this.position += 2; return v; }
@Override public final int readUnsignedShort() throws IOException { final int v = this.segment.getShortBigEndian(this.position) & 0xffff; this.position += 2; return v; }
@Override public final short readShort() throws IOException { final short v = this.segment.getShortBigEndian(this.position); this.position += 2; return v; }
@Override protected short _getShort(int index) { return memorySegment.getShortBigEndian(index); }
@Override public final short readShort() throws IOException { final short v = this.segment.getShortBigEndian(this.position); this.position += 2; return v; }
@Override protected short _getShort(int index) { return memorySegment.getShortBigEndian(index); }
@Override public int readUnsignedShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final int v = this.currentSegment.getShortBigEndian(this.positionInSegment) & 0xffff; this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readUnsignedShort(); } else { return (readUnsignedByte() << 8) | readUnsignedByte(); } }
@Override public int readUnsignedShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final int v = this.currentSegment.getShortBigEndian(this.positionInSegment) & 0xffff; this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readUnsignedShort(); } else { return (readUnsignedByte() << 8) | readUnsignedByte(); } }
@Override public short readShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final short v = this.currentSegment.getShortBigEndian(this.positionInSegment); this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readShort(); } else { return (short) ((readUnsignedByte() << 8) | readUnsignedByte()); } }
@Override public short readShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final short v = this.currentSegment.getShortBigEndian(this.positionInSegment); this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readShort(); } else { return (short) ((readUnsignedByte() << 8) | readUnsignedByte()); } }
@Override public int readUnsignedShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final int v = this.currentSegment.getShortBigEndian(this.positionInSegment) & 0xffff; this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readUnsignedShort(); } else { return (readUnsignedByte() << 8) | readUnsignedByte(); } }
@Override public short readShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final short v = this.currentSegment.getShortBigEndian(this.positionInSegment); this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readShort(); } else { return (short) ((readUnsignedByte() << 8) | readUnsignedByte()); } }