Interface Encoder

  • All Implemented Interfaces:

    
    public interface Encoder
    
                        

    Encode and decode byte arrays (typically from binary to 7-bit ASCII encodings).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract int getEncodedLength(int inputLength) Return the expected output length of the encoding.
      abstract int getMaxDecodedLength(int inputLength) Return the maximum expected output length of a decoding.
      abstract int encode(Array<byte> data, int off, int length, OutputStream out)
      abstract int decode(Array<byte> data, int off, int length, OutputStream out)
      abstract int decode(String data, OutputStream out)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getEncodedLength

         abstract int getEncodedLength(int inputLength)

        Return the expected output length of the encoding.

        Parameters:
        inputLength - the input length of the data.
        Returns:

        the output length of an encoding.

      • getMaxDecodedLength

         abstract int getMaxDecodedLength(int inputLength)

        Return the maximum expected output length of a decoding. If padding is present the value returned will be greater than the decoded data length.

        Parameters:
        inputLength - the input length of the encoded data.
        Returns:

        the upper bound of the output length of a decoding.