add limit to FusionDictionaryBufferInterface.

Change-Id: Ic9ff717a9751023d47b02ff3b9d1fbf3115c2501
This commit is contained in:
Yuichiro Hanada 2012-09-19 12:28:19 +09:00
parent a0ebb28d15
commit a149c53c8e
2 changed files with 11 additions and 0 deletions

View file

@ -96,6 +96,11 @@ public class UserHistoryDictIOUtils {
public void put(final byte b) { public void put(final byte b) {
mBuffer[mPosition++] = b; mBuffer[mPosition++] = b;
} }
@Override
public int limit() {
return mBuffer.length;
}
} }
/** /**

View file

@ -63,6 +63,7 @@ public class BinaryDictInputOutput {
public int position(); public int position();
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 static final class ByteBufferWrapper implements FusionDictionaryBufferInterface { public static final class ByteBufferWrapper implements FusionDictionaryBufferInterface {
@ -107,6 +108,11 @@ public class BinaryDictInputOutput {
public void put(final byte b) { public void put(final byte b) {
mBuffer.put(b); mBuffer.put(b);
} }
@Override
public int limit() {
return mBuffer.limit();
}
} }
/** /**