]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/engine/Dictionary.java
Clean up order of imports.
[Dictionary.git] / src / com / hughes / android / dictionary / engine / Dictionary.java
index 82ba2cfa6d90c319c1cbcb8d01e6950dbab19402..b500f7f1687936309f2f559e0e19541956759ea1 100644 (file)
 
 package com.hughes.android.dictionary.engine;
 
-import com.hughes.android.dictionary.DictionaryInfo;
-import com.hughes.util.CachingList;
-import com.hughes.util.raf.RAFList;
-import com.hughes.util.raf.RAFListSerializer;
-import com.hughes.util.raf.RAFSerializable;
-
 import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
 import java.io.DataInputStream;
@@ -31,11 +25,18 @@ import java.io.PrintStream;
 import java.io.RandomAccessFile;
 import java.nio.channels.Channels;
 import java.nio.channels.FileChannel;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.zip.GZIPOutputStream;
 
+import com.hughes.android.dictionary.DictionaryInfo;
+import com.hughes.util.CachingList;
+import com.hughes.util.raf.RAFList;
+import com.hughes.util.raf.RAFListSerializer;
+import com.hughes.util.raf.RAFSerializable;
+
 public class Dictionary implements RAFSerializable<Dictionary> {
 
     private static final int CACHE_SIZE = 5000;
@@ -214,7 +215,7 @@ public class Dictionary implements RAFSerializable<Dictionary> {
             out.seek(dataPos);
             out.writeShort(h.entrySource.index());
             out.writeUTF(h.title);
-            byte[] data = h.getHtml().getBytes("UTF-8");
+            byte[] data = h.getHtml().getBytes(StandardCharsets.UTF_8);
             out.writeInt(data.length);
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             GZIPOutputStream gzout = new GZIPOutputStream(baos);