org.ccil.cowan.tagsoup
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:
InputStream, Reader

Method Summary
 java.io.Reader autoDetectingReader(java.io.InputStream i)
          Given an InputStream, return a suitable Reader that understands the presumed character encoding of that InputStream.
 

Method Detail

autoDetectingReader

java.io.Reader autoDetectingReader(java.io.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


Licence: Academic Free License 3.0 and/or GPL 2.0