diff options
author | 2012-09-12 18:53:33 +0900 | |
---|---|---|
committer | 2012-09-13 16:35:41 +0900 | |
commit | 1a347723c5ad4a71076df67f3af3b702db205719 (patch) | |
tree | fc1136b6e94e95d6dccacd8a27f2aab714a0db20 /java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java | |
parent | 81d97eec0e77e72cce606f9c9f96091c0b348190 (diff) | |
download | latinime-1a347723c5ad4a71076df67f3af3b702db205719.tar.gz latinime-1a347723c5ad4a71076df67f3af3b702db205719.tar.xz latinime-1a347723c5ad4a71076df67f3af3b702db205719.zip |
Move FormatOptions and FileHeader to FormatSpec.
Change-Id: I232e35598635113bf2c81825669c744aadc79efe
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 { |