-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
good first issueGood for newcomersGood for newcomersquestionFurther information is requestedFurther information is requested
Description
ome-common-java/src/main/java/loci/common/ByteArrayHandle.java
Lines 183 to 186 in de268dd
| byte[] b = new byte[len]; | |
| read(b); | |
| buf.put(b, 0, len); | |
| return len; |
Line 184 does not return the returned number of bytes read. I’m thinking this number might be needed at line 185 when populating the ByteBuffer buf. This way, buf.position() will know exactly how many bytes were read. Maybe not important/needed??
Add len = to line 184?
len = read(b);
buf.put(b, 0, len);
Below is where the number of bytes read can get modified, line 163
ome-common-java/src/main/java/loci/common/ByteArrayHandle.java
Lines 161 to 167 in de268dd
| public int read(byte[] b, int off, int len) throws IOException { | |
| if (getFilePointer() + len > length()) { | |
| len = (int) (length() - getFilePointer()); | |
| } | |
| buffer.get(b, off, len); | |
| return len; | |
| } |
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersquestionFurther information is requestedFurther information is requested