Interface AutoDetector


public interface AutoDetector
Classes which accept an InputStream and provide a Reader which figures out the encoding of the InputStream and reads characters from it should conform to this interface.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Given an InputStream, return a suitable Reader that understands the presumed character encoding of that InputStream.
  • Method Details

    • autoDetectingReader

      Reader autoDetectingReader(InputStream i)
      Given an InputStream, return a suitable Reader that understands the presumed character encoding of that InputStream. If bytes are consumed from the InputStream in the process, they must be pushed back onto the InputStream so that they can be reinterpreted as characters.
      Parameters:
      i - The InputStream
      Returns:
      A Reader that reads from the InputStream