belugabehr commented on pull request #815: URL: https://github.com/apache/parquet-mr/pull/815#issuecomment-696929711
Here are a couple of starters: ``` private final ByteBuffer oneByteBuffer = ByteBuffer.allocate(1); @Override public int read() throws IOException { int read = this.channel.read(this.oneByteBuffer.rewind()); if (read < 0) { return read; } return (0xFF & this.oneByteBuffer.flip().get()); } @Override public void readFully(byte[] bytes) throws IOException { ByteBuffer bb = ByteBuffer.allocate(bytes.length); while (bb.hasRemaining()) { int read = this.channel.read(bb); if (read == -1) { throw new EOFException(); } } bb.flip().get(bytes); } ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org