Package org.gjt.sp.jedit.io
Interface EncodingDetector
-
- All Known Implementing Classes:
EncodingWithBOM.Detector,RegexEncodingDetector,XMLEncodingDetector
public interface EncodingDetectorAn interface to detect a reasonable encoding from some bytes at the beginning of a file. To offer your own EncodingDetector, implement this interface and define a service in yourservices.xmlfile. For example:<SERVICE CLASS="org.gjt.sp.jedit.io.EncodingDetector" NAME="XML-PI"> new XMLEncodingDetector(); </SERVICE>- Since:
- 4.3pre10
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringdetectEncoding(java.io.InputStream sample)Returns the name of a detected encoding for the bytes in sample.
-