diff options
author | 2012-09-13 00:38:43 -0700 | |
---|---|---|
committer | 2012-09-13 00:38:44 -0700 | |
commit | 328755eee2f6e44daa98a54bd0ee9c0f433c58be (patch) | |
tree | 79dc1cd654b69ab2472dc39063ab09cf20cfa606 /java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java | |
parent | 9deb52c9968c0dfc00713b76aff9398173df6f79 (diff) | |
parent | 1a347723c5ad4a71076df67f3af3b702db205719 (diff) | |
download | latinime-328755eee2f6e44daa98a54bd0ee9c0f433c58be.tar.gz latinime-328755eee2f6e44daa98a54bd0ee9c0f433c58be.tar.xz latinime-328755eee2f6e44daa98a54bd0ee9c0f433c58be.zip |
Merge "Move FormatOptions and FileHeader to FormatSpec." into jb-mr1-dev
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java index d268265c3..ef10f7270 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java @@ -16,6 +16,8 @@ package com.android.inputmethod.latin.makedict; +import com.android.inputmethod.latin.makedict.FormatSpec.FileHeader; +import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.CharGroup; import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions; import com.android.inputmethod.latin.makedict.FusionDictionary.Node; @@ -108,40 +110,6 @@ public class BinaryDictInputOutput { } /** - * Options about file format. - */ - public static class FormatOptions { - public final int mVersion; - public final boolean mHasParentAddress; - public FormatOptions(final int version) { - this(version, false); - } - public FormatOptions(final int version, final boolean hasParentAddress) { - mVersion = version; - if (version < FormatSpec.FIRST_VERSION_WITH_PARENT_ADDRESS && hasParentAddress) { - throw new RuntimeException("Parent addresses are only supported with versions " - + FormatSpec.FIRST_VERSION_WITH_PARENT_ADDRESS + " and ulterior."); - } - mHasParentAddress = hasParentAddress; - } - } - - /** - * Class representing file header. - */ - private static final class FileHeader { - public final int mHeaderSize; - public final DictionaryOptions mDictionaryOptions; - public final FormatOptions mFormatOptions; - public FileHeader(final int headerSize, final DictionaryOptions dictionaryOptions, - final FormatOptions formatOptions) { - mHeaderSize = headerSize; - mDictionaryOptions = dictionaryOptions; - mFormatOptions = formatOptions; - } - } - - /** * A class grouping utility function for our specific character encoding. */ private static class CharEncoding { |