Module jEdit

Interface Encoding

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 Details

    • getTextReader

      @Nonnull Reader getTextReader(@Nonnull InputStream in) throws IOException
      Map an InputStream to a Reader. Decode-error while reading from this Reader should be reported by throwing an IOException.
      Throws:
      IOException
    • getTextWriter

      @Nonnull Writer getTextWriter(@Nonnull OutputStream out) throws IOException
      Map an OutputStream to a Writer. Encode-error while writing to this Writer should be reported by throwing an IOException.
      Throws:
      IOException
    • getPermissiveTextReader

      @Nonnull Reader getPermissiveTextReader(@Nonnull InputStream in) throws IOException
      Map an InputStream to a Reader. Decode-error while reading from this Reader should be ignored or replaced.
      Throws:
      IOException