Class CharsetDetector


  • public class CharsetDetector
    extends Object
    Convenience method for detecting the character set of a byte array.
    Author:
    David B. Bracewell
    • Constructor Detail

      • CharsetDetector

        public CharsetDetector()
    • Method Detail

      • detect

        public static Charset detect​(byte[] buffer,
                                     int offset,
                                     int length)
        Detects the character set for the buffer.
        Parameters:
        buffer - The buffer
        offset - where to start
        length - the length to read
        Returns:
        The detected charset or null