Class CharsetDetector

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.mozilla.intl.chardet.nsDetector det  
      protected java.lang.String foundCharset  
      static java.lang.String REVISION  
    • Constructor Summary

      Constructors 
      Constructor Description
      CharsetDetector()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String detect​(java.io.File file)
      Detects and returns the probable charset of the given File.
      java.lang.String detect​(java.io.InputStream is)
      Detects and returns the probable charset of the given InputStream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • det

        protected final org.mozilla.intl.chardet.nsDetector det
      • foundCharset

        protected java.lang.String foundCharset
    • Constructor Detail

      • CharsetDetector

        public CharsetDetector()
    • Method Detail

      • detect

        public java.lang.String detect​(java.io.File file)
        Detects and returns the probable charset of the given File.
        Returns:
        a charset encoding or null if nothing could be found.
      • detect

        public java.lang.String detect​(java.io.InputStream is)
        Detects and returns the probable charset of the given InputStream.
        Returns:
        a charset encoding or null if nothing could be found.