public class FileCharsetDetector extends Object
| 构造器 | 说明 |
|---|---|
FileCharsetDetector() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
guestFileEncoding(File file) |
Check file encoding
|
String |
guestFileEncoding(File file,
int languageHint) |
Check file encoding
|
String |
guestFileEncoding(String path) |
Check file encoding
|
String |
guestFileEncoding(String path,
int languageHint) |
Get file encoding
|
public String guestFileEncoding(File file) throws FileNotFoundException, IOException
file - File objectFileNotFoundExceptionIOExceptionpublic String guestFileEncoding(File file, int languageHint) throws FileNotFoundException, IOException
file - File objectlanguageHint - Language comment code, eg: 1 : Japanese; 2 : Chinese; 3 : Simplified
Chinese; 4 : Traditional Chinese; 5 : Korean; 6 : Dont know (default)FileNotFoundExceptionIOExceptionpublic String guestFileEncoding(String path) throws FileNotFoundException, IOException
path - File pathFileNotFoundExceptionIOExceptionpublic String guestFileEncoding(String path, int languageHint) throws FileNotFoundException, IOException
path - File pathlanguageHint - Language comment code, eg: 1 : Japanese; 2 : Chinese; 3 : Simplified
Chinese; 4 : Traditional Chinese; 5 : Korean; 6 : Dont know (default)FileNotFoundExceptionIOExceptionCopyright © 2019. All rights reserved.