public abstract class AbstractBaseNEncoder extends Object implements Encoder
| Modifier and Type | Field and Description |
|---|---|
protected int |
lineLength
Number of base64 characters per line.
|
| Constructor and Description |
|---|
AbstractBaseNEncoder(char[] characterSet,
int charactersPerLine)
Creates a new instance with given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(ByteBuffer input,
CharBuffer output)
Encodes bytes in input buffer into characters placed in the output buffer.
|
void |
finalize(CharBuffer output)
Performs final output encoding (e.g.
|
protected abstract int |
getBitsPerChar() |
protected abstract int |
getBlockLength() |
int |
outputSize(int inputSize)
Expected number of characters in the output buffer for an input buffer of the given size.
|
public AbstractBaseNEncoder(char[] characterSet,
int charactersPerLine)
characterSet - Encoding character set.charactersPerLine - Number of characters per line.public void encode(ByteBuffer input, CharBuffer output) throws EncodingException
EncoderEncoder.finalize(java.nio.CharBuffer) after all input bytes have been provided.encode in interface Encoderinput - Input byte buffer.output - Output character buffer.EncodingException - on encoding errors.public void finalize(CharBuffer output) throws EncodingException
Encoderfinalize in interface Encoderoutput - Output character buffer.EncodingException - on encoding errors.public int outputSize(int inputSize)
EncoderoutputSize in interface EncoderinputSize - Size of input buffer in bytes.protected abstract int getBlockLength()
protected abstract int getBitsPerChar()
Copyright © 2003-2015 Virginia Tech. All Rights Reserved.