public abstract class AbstractBaseNDecoder extends Object implements Decoder
Constructor and Description |
---|
AbstractBaseNDecoder(byte[] decodingTable)
Creates a new instance with given parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(CharBuffer input,
ByteBuffer output)
Decodes characters in input buffer into bytes placed in the output buffer.
|
void |
finalize(ByteBuffer output)
Performs final output decoding (e.g.
|
protected abstract int |
getBitsPerChar() |
protected abstract int |
getBlockLength() |
int |
outputSize(int inputSize)
Expected number of bytes in the output buffer for an input buffer of the
given size.
|
public AbstractBaseNDecoder(byte[] decodingTable)
decodingTable
- Byte array indexed by characters in the character
set encoding.public void decode(CharBuffer input, ByteBuffer output)
Decoder.finalize(ByteBuffer)
. after all input bytes have been provided.public void finalize(ByteBuffer output)
public int outputSize(int inputSize)
outputSize
in interface Decoder
inputSize
- Size of input buffer in characters.protected abstract int getBlockLength()
protected abstract int getBitsPerChar()
Copyright © 2016 JBoss by Red Hat. All rights reserved.