ewe.io
Class Base64Decoder
java.lang.Object
ewe.util.Errorable
ewe.io.Base64Codec
ewe.io.Base64Decoder
- All Implemented Interfaces:
- DataProcessor
- public class Base64Decoder
- extends Base64Codec
- implements DataProcessor
|
Method Summary |
void |
closeProcess()
This aborts any on-going processing and frees resources associated with the processor. |
int |
getBlockSize()
This returns the size of a block to be processed - any data blocks
presented for processing must be multiples of this size. |
int |
getMaxBlockSize()
This returns the largest block that can be processed. |
ByteArray |
processBlock(byte[] source,
int offset,
int length,
boolean isLast,
ByteArray dest)
This processes a block of data and places the output in the provided ByteArray. |
Base64Decoder
public Base64Decoder()
closeProcess
public void closeProcess()
- Description copied from interface:
DataProcessor
- This aborts any on-going processing and frees resources associated with the processor. The processor
should not be used again after this. An IOException should be thrown if there was an error closing the process.
- Specified by:
closeProcess in interface DataProcessor
getBlockSize
public int getBlockSize()
- Description copied from interface:
DataProcessor
- This returns the size of a block to be processed - any data blocks
presented for processing must be multiples of this size. If it is less
than or equal to 1 it is assumed to be 1.
- Specified by:
getBlockSize in interface DataProcessor
getMaxBlockSize
public int getMaxBlockSize()
- Description copied from interface:
DataProcessor
- This returns the largest block that can be processed. Any data blocks presented
for processing must be a multiple of getBlockSize() and must be less than or equal
to getMaxBlockSize(). If this returns less than or equal to zero then there is no
maximum size.
- Specified by:
getMaxBlockSize in interface DataProcessor
processBlock
public ByteArray processBlock(byte[] source,
int offset,
int length,
boolean isLast,
ByteArray dest)
throws IOException
- Description copied from interface:
DataProcessor
- This processes a block of data and places the output in the provided ByteArray. If the
ByteArray is null a new one will be created. The ByteArray will be expanded if necessary
to hold the output data.
isLastBlock should be set true if this is the last set of data to be processed. If you want
to end a processing run, but have no more data to provide - you can set length to be zero
(you can then also set inputData to be null) and set isLastBlock true.
If isLastBlock is true the DataProcessor should accept any input data, complete processing
and output ALL of any remaining processed data. It should then reset itself so that the next
call of processBlock is considered to be the start of a new sequence of data.
If there is an error processing the data, an IOException should be thrown.
- Specified by:
processBlock in interface DataProcessor
- Throws:
IOException