org.apache.ws.commons.util

Class Base64.Decoder

Enclosing Class:
Base64

public static abstract class Base64.Decoder
extends java.lang.Object

An encoder is an object, which is able to decode char arrays in blocks of four bytes. Any such block is converted into a array of three bytes.

Constructor Summary

Decoder(int pBufLen)
Creates a new instance.

Method Summary

void
flush()
Indicates, that no more data is being expected.
void
write(char[] pData, int pOffset, int pLen)
Converts the Base64 encoded character array.
protected abstract void
writeBuffer(byte[] pBuffer, int pOffset, int pLen)
Called for writing the decoded bytes to the destination.

Constructor Details

Decoder

protected Decoder(int pBufLen)
Creates a new instance.

Method Details

flush

public void flush()
            throws IOException

write

public void write(char[] pData,
                  int pOffset,
                  int pLen)
            throws IOException
Converts the Base64 encoded character array.
Parameters:
pData - The character array being decoded.
pOffset - Offset of first character being decoded.
pLen - Number of characters being decoded.

writeBuffer

protected abstract void writeBuffer(byte[] pBuffer,
                                    int pOffset,
                                    int pLen)
            throws IOException
Called for writing the decoded bytes to the destination.
Parameters:
pBuffer - The byte array being written.
pOffset - Offset of the first byte being written.
pLen - Number of bytes being written.