Exemplo n.º 1
0
 @Override
 public void getBytes(int index, ByteBuffer dst) {
   int pos = delegate.positionReader(index);
   try {
     readBytes(dst);
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 2
0
 @Override
 public void getBytes(int index, OutputStream out, int length) throws IOException {
   int pos = delegate.positionReader(index);
   try {
     readBytes(out, length);
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 3
0
 @Override
 public short getUnsignedByte(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readUnsignedByte();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 4
0
 @Override
 public void getBytes(int index, byte[] dst, int dstIndex, int length) {
   int pos = delegate.positionReader(index);
   try {
     readBytes(dst, dstIndex, length);
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 5
0
 @Override
 public float getFloat(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readFloat();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 6
0
 @Override
 public double getDouble(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readDouble();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 7
0
 @Override
 public long getLong(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readLong();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 8
0
 @Override
 public char getChar(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readChar();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 9
0
 @Override
 public long getUnsignedInt(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readUnsignedInt();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 10
0
 @Override
 public int getUnsignedMedium(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readUnsignedMedium();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 11
0
 @Override
 public short getShort(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readShort();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 12
0
 @Override
 public int getBytes(int index, GatheringByteChannel out, int length) throws IOException {
   int pos = delegate.positionReader(index);
   try {
     return readBytes(out, length);
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 13
0
 @Override
 public void getBytes(int index, ChannelBuffer dst, int length) {
   int pos = delegate.positionReader(index);
   try {
     readBytes(dst, length);
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 14
0
 @Override
 public byte getByte(int index) {
   int pos = delegate.positionReader(index);
   try {
     return readByte();
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 15
0
 @Override
 public int indexOf(int fromIndex, int toIndex, byte value) {
   int pos = delegate.positionReader(fromIndex);
   try {
     while (delegate.readerPosition() < toIndex) {
       int thisPos = delegate.readerPosition();
       if (delegate.get() == value) {
         return thisPos;
       }
     }
     return -1;
   } catch (ReadPastEndException e) {
     throw new RuntimeException(e);
   } finally {
     delegate.positionReader(pos);
   }
 }
Exemplo n.º 16
0
 @Override
 public void skipBytes(int length) {
   delegate.positionReader(delegate.readerPosition() + length);
 }
Exemplo n.º 17
0
 @Override
 public void setIndex(int readerIndex, int writerIndex) {
   delegate.positionReader(readerIndex);
   delegate.positionWriter(writerIndex);
 }
Exemplo n.º 18
0
 @Override
 public void readerIndex(int readerIndex) {
   delegate.positionReader(readerIndex);
 }