- All Known Implementing Classes:
CharsetEncoding
,EncodingWithBOM
,Native2ASCIIEncoding
public interface Encoding
An interface to represent an encoding.
An encoding is a mapping between a character stream and a byte
stream. It is like java.nio.charset.Charset but has slightly
different form. This can represents some extended encodings like
UTF-8Y which drops (inserts) the BOM bytes before actual decoding
(encoding). This also enables to add some extended encodings such
as ASCII representation used by Java property files.
- Since:
- 4.3pre10
- Author:
- Kazutoshi Satoda
-
Method Summary
Modifier and TypeMethodDescriptionMap an InputStream to a Reader.Map an InputStream to a Reader.Map an OutputStream to a Writer.
-
Method Details
-
getTextReader
Map an InputStream to a Reader. Decode-error while reading from this Reader should be reported by throwing an IOException.- Throws:
IOException
-
getTextWriter
Map an OutputStream to a Writer. Encode-error while writing to this Writer should be reported by throwing an IOException.- Throws:
IOException
-
getPermissiveTextReader
Map an InputStream to a Reader. Decode-error while reading from this Reader should be ignored or replaced.- Throws:
IOException
-