java.lang.Object
i2p.susi.webmail.encoding.Encoding
i2p.susi.webmail.encoding.EightBit

public class EightBitextends Encoding
Decode only. See encode(byte[]).
  • Constructor Details

    • EightBit

      public EightBit()
      Constructor. Decoding reads the whole stream and needs no configuration, so a bare instance is ready to use.
  • Method Details

    • getName

      public String getName()
      Description copied from class: Encoding
      Returns the name of this encoding.
      Specified by:
      getName in class Encoding
      Returns:
      the encoding name
    • encode

      public String encode(byte[] in) throws EncodingException
      Not supported, always throws.
      Specified by:
      encode in class Encoding
      Parameters:
      in - the byte array to encode
      Returns:
      the encoded string, SMTP-safe
      Throws:
      EncodingException - always; 8bit encoding is not supported
    • decode

      public Buffer decode(byte[] in, int offset, int length)
      Description copied from class: Encoding
      Decode a portion of a byte array.
      Overrides:
      decode in class Encoding
      Parameters:
      in - the byte array to decode
      offset - the starting position in the array
      length - the number of bytes to decode
      Returns:
      a buffer containing the decoded data as a String
    • decode

      public Buffer decode(Buffer in)
      Pass the bytes through unchanged.
      Overrides:
      decode in class Encoding
      Parameters:
      in - the buffer containing data to decode
      Returns:
      the same buffer, unchanged
      See Also:
    • decode

      public void decode(InputStream in, Buffer out) throws IOException
      Copy in to out, unchanged.
      Specified by:
      decode in class Encoding
      Parameters:
      in - the input stream to read data from
      out - the buffer to write decoded data to
      Throws:
      IOException - if reading from input stream fails
      See Also: