Skip to content
Snippets Groups Projects
Commit 40e91e45 authored by Ken Wakasa's avatar Ken Wakasa Committed by Android (Google) Code Review
Browse files

Merge "Check the version of format options before writing."

parents e531c224 8a06b26c
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,12 @@ public class Ver3DictEncoder implements DictEncoder { ...@@ -68,6 +68,12 @@ public class Ver3DictEncoder implements DictEncoder {
@Override @Override
public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions) public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions)
throws IOException, UnsupportedFormatException { throws IOException, UnsupportedFormatException {
if (formatOptions.mVersion > 3) {
throw new UnsupportedFormatException(
"The given format options has wrong version number : "
+ formatOptions.mVersion);
}
if (mOutStream == null) { if (mOutStream == null) {
openStream(); openStream();
} }
......
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