@Test public void testReadString() throws Exception { String s = "hello"; InputStream in = new ByteArrayInputStream(s.getBytes("UTF-8")); Decoder decoder = new ColumnDecoder(in); assertEquals(s, decoder.readString()); in = new ByteArrayInputStream(s.getBytes("UTF-8")); decoder = new ColumnDecoder(in); assertEquals(s, decoder.readString(new Utf8()).toString()); }
@Override public Utf8 readString(Utf8 old) throws IOException { int bytesAvailable = in.available(); byte[] bytes = new byte[bytesAvailable]; in.read(bytes); return new Utf8(bytes); }
ColumnDecoder extends Decoder { @Override public Utf8 readString(Utf8 old) throws IOException { int bytesAvailable = in.available(); byte[] bytes = new byte[bytesAvailable]; in.read(bytes); return new Utf8(bytes); } }
ColumnDecoder extends Decoder { @Override public Utf8 readString(Utf8 old) throws IOException { int bytesAvailable = in.available(); byte[] bytes = new byte[bytesAvailable]; in.read(bytes); return new Utf8(bytes); } ColumnDecoder(InputStream in); }
ColumnDecoder extends Decoder { @Override public Utf8 readString(Utf8 old) throws IOException { int bytesAvailable = in.available(); byte[] bytes = new byte[bytesAvailable]; in.read(bytes); return new Utf8(bytes); } ColumnDecoder(InputStream in); @Override void readNull(); @Override boolean readBoolean(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override Utf8 readString(Utf8 old); @Override String readString(); @Override void skipString(); @Override ByteBuffer readBytes(ByteBuffer old); @Override void skipBytes(); @Override void readFixed(byte[] bytes, int start, int length); @Override void skipFixed(int length); @Override int readEnum(); @Override long readArrayStart(); @Override long arrayNext(); @Override long skipArray(); @Override long readMapStart(); @Override long mapNext(); @Override long skipMap(); @Override int readIndex(); }
ColumnDecoder extends Decoder { @Override public Utf8 readString(Utf8 old) throws IOException { int bytesAvailable = in.available(); byte[] bytes = new byte[bytesAvailable]; in.read(bytes); return new Utf8(bytes); } ColumnDecoder(InputStream in); @Override void readNull(); @Override boolean readBoolean(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override Utf8 readString(Utf8 old); @Override String readString(); @Override void skipString(); @Override ByteBuffer readBytes(ByteBuffer old); @Override void skipBytes(); @Override void readFixed(byte[] bytes, int start, int length); @Override void skipFixed(int length); @Override int readEnum(); @Override long readArrayStart(); @Override long arrayNext(); @Override long skipArray(); @Override long readMapStart(); @Override long mapNext(); @Override long skipMap(); @Override int readIndex();  }