Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kortemik committed Oct 11, 2023
1 parent e21136b commit f4669d1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/main/java/com/teragrep/blf_01/PartialToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public class PartialToken {
this.partialToken = ByteBuffer.allocateDirect(256);
}

// +++++ PartialToken stuff
Token completeToken() {
Token token = new Token();
if (partialToken.flip().limit() != 0) {
Expand All @@ -65,24 +64,19 @@ Token completeToken() {
partialToken.clear();
return token;
}
// -----

// +++++ PartialToken stuff
private ByteBuffer extendBuffer(ByteBuffer byteBuffer, int size) {
ByteBuffer newBuffer = ByteBuffer.allocateDirect(byteBuffer.capacity() + size);
byteBuffer.flip();
newBuffer.put(byteBuffer);
return newBuffer;
}
// -----


public void put(byte b) {
// +++++ PartialToken stuff
if (partialToken.position() == partialToken.capacity()) {
partialToken = extendBuffer(partialToken,256);
}
partialToken.put(b);
// -----
}
}

0 comments on commit f4669d1

Please sign in to comment.