Package org.gjt.sp.jedit.io
Class XMLEncodingDetector
- java.lang.Object
-
- org.gjt.sp.jedit.io.XMLEncodingDetector
-
- All Implemented Interfaces:
EncodingDetector
public class XMLEncodingDetector extends java.lang.Object implements EncodingDetector
An encoding detector which extracts encoding from XML declaration.- Since:
- 4.3pre10
-
-
Constructor Summary
Constructors Constructor Description XMLEncodingDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
detectEncoding(java.io.InputStream sample)
Returns the name of a detected encoding for the bytes in sample.
-
-
-
Method Detail
-
detectEncoding
public java.lang.String detectEncoding(java.io.InputStream sample) throws java.io.IOException
Description copied from interface:EncodingDetector
Returns the name of a detected encoding for the bytes in sample. Returns null if this instance could not detect reasonable one.- Specified by:
detectEncoding
in interfaceEncodingDetector
- Throws:
java.io.IOException
-
-