Skip to content

Commit fee3e14

Browse files
committed
CharType使用IOAdapter fix hankcs#1480
1 parent fd2a829 commit fee3e14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/hankcs/hanlp/dictionary/other/CharType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
import com.hankcs.hanlp.HanLP;
1515
import com.hankcs.hanlp.corpus.io.ByteArray;
16+
import com.hankcs.hanlp.corpus.io.IOUtil;
1617
import com.hankcs.hanlp.utility.TextUtility;
1718

1819
import java.io.DataOutputStream;
19-
import java.io.FileOutputStream;
2020
import java.io.IOException;
2121
import java.util.LinkedList;
2222
import java.util.List;
@@ -131,7 +131,7 @@ private static ByteArray generate() throws IOException
131131
typeList.add(array);
132132
}
133133
// System.out.print("int[" + typeList.size() + "][3] array = \n");
134-
DataOutputStream out = new DataOutputStream(new FileOutputStream(HanLP.Config.CharTypePath));
134+
DataOutputStream out = new DataOutputStream(IOUtil.newOutputStream(HanLP.Config.CharTypePath));
135135
for (int[] array : typeList)
136136
{
137137
// System.out.printf("%d %d %d\n", array[0], array[1], array[2]);

0 commit comments

Comments
 (0)