ppkarwasz commented on code in PR #784:
URL: https://github.com/apache/commons-io/pull/784#discussion_r2368026868


##########
src/main/java/org/apache/commons/io/build/AbstractOrigin.java:
##########
@@ -324,6 +589,18 @@ public Reader getReader(final Charset charset) throws 
IOException {
             return new InputStreamReader(getInputStream(), 
Charsets.toCharset(charset));
         }
 
+        @Override
+        public ReadableByteChannel getReadableByteChannel(OpenOption... 
options) throws IOException {
+            return Channels.newChannel(getInputStream(options));
+        }
+
+        public long size() throws IOException {
+            if (origin instanceof FileInputStream) {
+                final FileInputStream fileInputStream = (FileInputStream) 
origin;
+                return fileInputStream.getChannel().size();
+            }
+            throw unsupportedOperation("size");
+        }

Review Comment:
   Fixed in 
https://github.com/apache/commons-io/pull/784/commits/a2dd032ef042b0fa35bf68ba49cd66636bf2d3bd



-- 
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]

Reply via email to