1718192021222324252627
protected String charset_; public String detect(byte [] buf){ nsDetector det = new nsDetector(nsPSMDetector.ALL) ; charset_ = null; det.Init(new nsICharsetDetectionObserver() { @Override public void Notify(String charset) { charset_ = charset; }
101102103104105106107108109110111
@Deprecated() public static String detect(byte [] buf){ nsDetector det = new nsDetector(nsPSMDetector.ALL) ; charset_ = null; det.Init(new nsICharsetDetectionObserver() { @Override public void Notify(String charset) { charset_ = charset; }