Skip to content
Snippets Groups Projects
Commit cc958dd9 authored by Yuichiro Hanada's avatar Yuichiro Hanada
Browse files

Refactor BinaryDictInputOutput.

Change-Id: Idb4b635fcac70cc988e0dd3ce3bf121fba12099c
parent d7fdc730
No related branches found
No related tags found
No related merge requests found
...@@ -1596,12 +1596,6 @@ public class BinaryDictInputOutput { ...@@ -1596,12 +1596,6 @@ public class BinaryDictInputOutput {
return newDict; return newDict;
} }
// TODO: remove this method.
public static FusionDictionary readDictionaryBinary(final ByteBuffer buffer,
final FusionDictionary dict) throws IOException, UnsupportedFormatException {
return readDictionaryBinary(new ByteBufferWrapper(buffer), dict);
}
/** /**
* Basic test to find out whether the file is a binary dictionary or not. * Basic test to find out whether the file is a binary dictionary or not.
* *
......
...@@ -244,7 +244,8 @@ public class DictionaryMaker { ...@@ -244,7 +244,8 @@ public class DictionaryMaker {
inStream = new FileInputStream(file); inStream = new FileInputStream(file);
final ByteBuffer buffer = inStream.getChannel().map( final ByteBuffer buffer = inStream.getChannel().map(
FileChannel.MapMode.READ_ONLY, 0, file.length()); FileChannel.MapMode.READ_ONLY, 0, file.length());
return BinaryDictInputOutput.readDictionaryBinary(buffer, null); return BinaryDictInputOutput.readDictionaryBinary(
new BinaryDictInputOutput.ByteBufferWrapper(buffer), null);
} finally { } finally {
if (inStream != null) { if (inStream != null) {
try { try {
......
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