Package org.gjt.sp.jedit.io
Class AutoDetection.Result
- java.lang.Object
-
- org.gjt.sp.jedit.io.AutoDetection.Result
-
- Enclosing class:
- AutoDetection
public static class AutoDetection.Result extends java.lang.Object
An utility class to hold the result of some auto detections.
-
-
Constructor Summary
Constructors Constructor Description Result(java.io.InputStream in)
Do some auto detection for a stream and hold the result in this instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDetectedEncoding()
Returns the auto detected encoding.java.io.BufferedInputStream
getRewindedStream()
Returns the stream which can be read the contents of the original stream.boolean
streamIsGzipped()
Returns true if the stream is gzipped.
-
-
-
Method Detail
-
getRewindedStream
public java.io.BufferedInputStream getRewindedStream() throws java.io.IOException
Returns the stream which can be read the contents of the original stream. Some bytes ware read from original stream for auto detections. But they are rewinded at this method.- Throws:
java.io.IOException
-
streamIsGzipped
public boolean streamIsGzipped()
Returns true if the stream is gzipped.
-
getDetectedEncoding
public java.lang.String getDetectedEncoding()
Returns the auto detected encoding. Returns null if no encoding was detected.
-
-