luyuncheng commented on code in PR #987:
URL: https://github.com/apache/lucene/pull/987#discussion_r925199445


##########
lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataInput.java:
##########
@@ -165,6 +165,36 @@ public void readBytes(byte[] arr, int off, int len) throws 
EOFException {
       }
     }
   }
+  /**
+   * ReadBytes from position with length, if [pos, pos + len] stay in one 
ByteBuffer can ignore
+   * memory copy, otherwise return a new ByteBuffer with continuous byte array
+   *
+   * @param length from position to length
+   * @return ByteBuffer which bytes read from [pos, pos + length]
+   */
+  public ByteBuffer readBytes(int length) throws EOFException {

Review Comment:
   LGTM, rename it with `readNBytes`



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to