i2p.susi.webmail.encoding

## Class SevenBit

- java.lang.Object
- - i2p.susi.webmail.encoding.Encoding
  - - i2p.susi.webmail.encoding.SevenBit

-     public class SevenBit
      extends Encoding

  Decode only.

- - ### Field Summary

    - ### Fields inherited from class i2p.susi.webmail.encoding.Encoding

      `_log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SevenBit()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Buffer` | `decode(Buffer in)` We don't do any 8-bit checks like we do for decode(byte[])
    `Buffer` | `decode(byte[] in, int offset, int length)` Decode a portion of a byte array.
    `void` | `decode(InputStream in, Buffer out)` Copy in to out, unchanged We don't do any 8-bit checks like we do for decode(byte[])
    `String` | `encode(byte[] in)` Encode a byte array to a ASCII or ISO-8859-1 String.
    `String` | `getName()` Returns the name of this encoding.

    - ### Methods inherited from class i2p.susi.webmail.encoding.Encoding

      `decode, decode, decode, encode, encode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SevenBit

          public SevenBit()

  - ### Method Detail

    - #### decode

          public Buffer decode(Buffer in)

      We don't do any 8-bit checks like we do for decode(byte[])
      Overrides:
        `decode` in class `Encoding`
      Parameters:
        `in` - the buffer containing data to decode
      Returns:
        in, unchanged
      See Also:
        `Encoding.decode(byte[], int, int)`

    - #### decode

          public Buffer decode(byte[] in,
                               int offset,
                               int length)
                        throws DecodingException

      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
      Throws:
        `DecodingException` - on illegal characters

    - #### decode

          public void decode(InputStream in,
                             Buffer out)
                      throws IOException

      Copy in to out, unchanged We don't do any 8-bit checks like we do for decode(byte[])
      Specified by:
        `decode` in class `Encoding`
      Parameters:
        `in` - the input stream to read data from
        `out` - the buffer to write decoded data to
      Throws:
        `DecodingException` - if decoding fails
        `IOException` - if reading from input stream fails
      See Also:
        `Encoding.decode(byte[], int, int)`

    - #### 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` - the byte array to encode
      Returns:
        the encoded string, SMTP-safe
      Throws:
        `EncodingException` - always

    - #### 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