aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2013-09-12 17:46:09 +0900
committerYuichiro Hanada <yhanada@google.com>2013-09-12 20:14:09 +0900
commit0e40cd0c40f2c731f91ccd0561e251262e5a2614 (patch)
treeebbb0a42820b1c5d1d18a5f3282ecec000b53520 /java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java
parentbe470f06e48e40a0def32e0f34e3ca48113937b5 (diff)
downloadlatinime-0e40cd0c40f2c731f91ccd0561e251262e5a2614.tar.gz
latinime-0e40cd0c40f2c731f91ccd0561e251262e5a2614.tar.xz
latinime-0e40cd0c40f2c731f91ccd0561e251262e5a2614.zip
Add getDictDecoder.
Bug: 9618601 Change-Id: I173100ac704c03f7d5d0d53477e83cab5d1110d4
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java
index 6dff9b6d2..1a90a4b98 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java
@@ -173,11 +173,7 @@ public class Ver3DictDecoder implements DictDecoder {
private final DictionaryBufferFactory mBufferFactory;
private DictBuffer mDictBuffer;
- public Ver3DictDecoder(final File file) {
- this(file, USE_READONLY_BYTEBUFFER);
- }
-
- public Ver3DictDecoder(final File file, final int factoryFlag) {
+ /* package */ Ver3DictDecoder(final File file, final int factoryFlag) {
mDictionaryBinaryFile = file;
mDictBuffer = null;
@@ -192,15 +188,21 @@ public class Ver3DictDecoder implements DictDecoder {
}
}
- public Ver3DictDecoder(final File file, final DictionaryBufferFactory factory) {
+ /* package */ Ver3DictDecoder(final File file, final DictionaryBufferFactory factory) {
mDictionaryBinaryFile = file;
mBufferFactory = factory;
}
+ @Override
public void openDictBuffer() throws FileNotFoundException, IOException {
mDictBuffer = mBufferFactory.getDictionaryBuffer(mDictionaryBinaryFile);
}
+ @Override
+ public boolean isOpenedDictBuffer() {
+ return mDictBuffer != null;
+ }
+
/* package */ DictBuffer getDictBuffer() {
return mDictBuffer;
}