ppkarwasz commented on code in PR #784:
URL: https://github.com/apache/commons-io/pull/784#discussion_r2367073492
##########
src/main/java/org/apache/commons/io/build/AbstractOrigin.java:
##########
@@ -137,6 +372,16 @@ public Writer getWriter(final Charset charset, final
OpenOption... options) thro
return new OutputStreamWriter(getOutputStream(options),
Charsets.toCharset(charset));
}
+ @Override
+ public ReadableByteChannel getReadableByteChannel(OpenOption...
options) throws IOException {
+ return getRandomAccessFile(options).getChannel();
Review Comment:
Good point! :100:
Should we introduce an `AbstractFileBasedOrigin` that introduces a
`getFileChannel()` method? Some origins support that (`RandomAccessFile`,
`File`, `Path` and possibly `FileInputStream/FileOutputStream`) but others
don't.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]