am a0fe76f6: am cc958dd9: Refactor BinaryDictInputOutput.

* commit 'a0fe76f6d542bce06af46e5750237fef51f2f8a6':
  Refactor BinaryDictInputOutput.
main
Yuichiro Hanada 2012-09-14 10:29:38 -07:00 committed by Android Git Automerger
commit 2132c6d85e
2 changed files with 2 additions and 7 deletions

View File

@ -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.
* *

View File

@ -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 {