Class UniversalDetector


  • public class UniversalDetector
    extends Object
    • Constructor Detail

      • UniversalDetector

        public UniversalDetector​(CharsetListener listener)
        Parameters:
        listener - a listener object that is notified of the detected encocoding. Can be null.
    • Method Detail

      • isDone

        public boolean isDone()
      • getDetectedCharset

        public String getDetectedCharset()
        Returns:
        The detected encoding is returned. If the detector couldn't determine what encoding was used, null is returned.
      • handleData

        public void handleData​(byte[] buf,
                               int offset,
                               int length)
      • dataEnd

        public void dataEnd()
      • reset

        public void reset()