You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/10/03 18:38:58 UTC

[GitHub] [lucene] jpountz commented on a change in pull request #348: LUCENE-10143: Make DataInput/Output short/int/long reads and writes abstract

jpountz commented on a change in pull request #348:
URL: https://github.com/apache/lucene/pull/348#discussion_r720719926



##########
File path: lucene/core/src/java/org/apache/lucene/store/InputStreamDataInput.java
##########
@@ -33,6 +33,21 @@ public byte readByte() throws IOException {
     return (byte) v;
   }
 
+  @Override
+  public short readShort() throws IOException {
+    return readShortSlowly();
+  }
+
+  @Override
+  public int readInt() throws IOException {
+    return readIntSlowly();
+  }
+
+  @Override
+  public long readLong() throws IOException {
+    return readLongSlowly();
+  }

Review comment:
       it looks like this class is often instantiated on a buffered input stream, could we read directly from the buffer?




-- 
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-unsubscribe@lucene.apache.org

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



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