Skip to content
Snippets Groups Projects
Commit a161bdac authored by Yuichiro Hanada's avatar Yuichiro Hanada
Browse files

add capacity to FusionDictionaryBufferInterface.

bug: 6669677

Change-Id: I4627093811a19c46ce13fe351d1db63cbd78cf4a
parent 35ffb906
No related branches found
No related tags found
No related merge requests found
...@@ -100,6 +100,11 @@ public class UserHistoryDictIOUtils { ...@@ -100,6 +100,11 @@ public class UserHistoryDictIOUtils {
@Override @Override
public int limit() { public int limit() {
return mBuffer.length - 1;
}
@Override
public int capacity() {
return mBuffer.length; return mBuffer.length;
} }
} }
......
...@@ -63,6 +63,7 @@ public class BinaryDictInputOutput { ...@@ -63,6 +63,7 @@ public class BinaryDictInputOutput {
public void position(int newPosition); public void position(int newPosition);
public void put(final byte b); public void put(final byte b);
public int limit(); public int limit();
public int capacity();
} }
public static final class ByteBufferWrapper implements FusionDictionaryBufferInterface { public static final class ByteBufferWrapper implements FusionDictionaryBufferInterface {
...@@ -112,6 +113,11 @@ public class BinaryDictInputOutput { ...@@ -112,6 +113,11 @@ public class BinaryDictInputOutput {
public int limit() { public int limit() {
return mBuffer.limit(); return mBuffer.limit();
} }
@Override
public int capacity() {
return mBuffer.capacity();
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment