[
https://issues.apache.org/jira/browse/PARQUET-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17200329#comment-17200329
]
ASF GitHub Bot commented on PARQUET-1776:
-----------------------------------------
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:
[email protected]
> Add Java NIO Avro OutputFile InputFile
> --------------------------------------
>
> Key: PARQUET-1776
> URL: https://issues.apache.org/jira/browse/PARQUET-1776
> Project: Parquet
> Issue Type: Improvement
> Components: parquet-avro
> Reporter: David Mollitor
> Priority: Minor
>
> Add a wrapper around Java NIO Path for {{org.apache.parquet.io.OutputFile}}
> and {{org.apache.parquet.io.InputFile}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)