Class CharsetSniffingInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class CharsetSniffingInputStream
    extends FilterInputStream
    Will attempt to autodetect the character encoding from the stream By default, this will preserve the BOM if it exists
    • Constructor Detail

      • CharsetSniffingInputStream

        public CharsetSniffingInputStream​(InputStream in)
      • CharsetSniffingInputStream

        public CharsetSniffingInputStream​(InputStream in,
                                          boolean preserveBom)
    • Method Detail

      • isBomSet

        public boolean isBomSet()
      • getEncoding

        public String getEncoding()