| |
|
| java.lang.Object org.gjt.sp.jedit.io.AutoDetection
AutoDetection | public class AutoDetection (Code) | | Some functions for auto detection of I/O stream properties.
|
Inner Class :public static class Result | |
getDetectedEncoding | public static String getDetectedEncoding(BufferedInputStream markedStream) throws IOException(Code) | | Returns an auto detected encoding from content of markedStream.
This method assumes that markedStream is wrapped by
getMarkedStream() method.
|
getEncodingDetectors | public static List<EncodingDetector> getEncodingDetectors()(Code) | | Returns the user configured ordered list of encoding detectors.
This method reads property "encodingDetectors".
|
getMarkedStream | public static BufferedInputStream getMarkedStream(InputStream in)(Code) | | Returns a marked, rewindable stream.
Calling reset() method rewinds the stream to its beginning.
But reset() can fail if too long bytes were read.
|
isGzipped | public static boolean isGzipped(InputStream sample) throws IOException(Code) | | Returns wheather the stream is gzipped.
This method reads a few bytes from the sample. So a caller
must take care of mark() to reuse the contents. Wraping the
stream by getMarkedStream() is suitable.
|
|
|
|