Module jEdit

Class AutoDetection.Result

java.lang.Object
org.gjt.sp.jedit.io.AutoDetection.Result
Enclosing class:
AutoDetection

public static class AutoDetection.Result extends Object
An utility class to hold the result of some auto detections.
  • Constructor Details

    • Result

      public Result(InputStream in) throws IOException
      Do some auto detection for a stream and hold the result in this instance.
      Parameters:
      in - the stream
      Throws:
      IOException
  • Method Details

    • getRewindedStream

      public BufferedInputStream getRewindedStream() throws 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:
      IOException
    • streamIsGzipped

      public boolean streamIsGzipped()
      Returns true if the stream is gzipped.
    • getDetectedEncoding

      public String getDetectedEncoding()
      Returns the auto detected encoding. Returns null if no encoding was detected.