org.gjt.sp.jedit.io
Interface EncodingDetector

All Known Implementing Classes:
BufferLocalEncodingDetector, EncodingWithBOM.Detector, XMLEncodingDetector

public interface EncodingDetector

An interface to detect a reasonable encoding from some bytes at the beginning of a file.

Since:
4.3pre10

Method Summary
 java.lang.String detectEncoding(java.io.InputStream sample)
          Returns the name of a detected encoding for the bytes in sample.
 

Method Detail

detectEncoding

java.lang.String detectEncoding(java.io.InputStream sample)
                                throws java.io.IOException
Returns the name of a detected encoding for the bytes in sample. Returns null if this instance could not detect reasonable one.

Throws:
java.io.IOException