Class Binary

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

public class Binary extends Encoding
Same as EightBit
Since:
0.9.61
  • Constructor Details

    • Binary

      public Binary()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in class Encoding
    • encode

      public String encode(byte[] in) throws EncodingException
      Description copied from class: Encoding
      Encode a byte array to a ASCII or ISO-8859-1 String. Output must be SMTP-safe: Line length of 998 or less, using SMTP-safe characters, followed by \r\n, and must not start with a '.' unless escaped by a 2nd dot. For some encodings, max line length is 76.
      Specified by:
      encode in class Encoding
      Parameters:
      in -
      Returns:
      Encoded string.
      Throws:
      EncodingException
    • decode

      public Buffer decode(byte[] in, int offset, int length)
      Overrides:
      decode in class Encoding
      Parameters:
      in -
      offset -
      length -
      Returns:
      Output buffer containing decoded String.
    • decode

      public Buffer decode(Buffer in)
      Description copied from class: Encoding
      This implementation just calls decode(in.content, in.offset, in.length). Most classes will not need to override.
      Overrides:
      decode in class Encoding
      Parameters:
      in -
      Returns:
      in 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 -
      Throws:
      IOException
      See Also: