Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.util.encoders
Interface Encoder

All Known Implementing Classes:
  Base32Encoder, Base64Encoder, HexEncoder

public interface Encoder

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

Method Summary
`int` | `decode(byte[] data, int off, int length, java.io.OutputStream out)`
`int` | `decode(java.lang.String data, java.io.OutputStream out)`
`int` | `encode(byte[] data, int off, int length, java.io.OutputStream out)`
`int` | `getEncodedLength(int inputLength)` Return the expected output length of the encoding.
`int` | `getMaxDecodedLength(int inputLength)` Return the maximum expected output length of a decoding.

Method Detail

### getEncodedLength

    public 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

    public 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.

### encode

    public int encode(byte[] data,
                      int off,
                      int length,
                      java.io.OutputStream out)
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### decode

    public int decode(byte[] data,
                      int off,
                      int length,
                      java.io.OutputStream out)
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### decode

    public int decode(java.lang.String data,
                      java.io.OutputStream out)
               throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD