Class CharsetDecoderBlock
- java.lang.Object
-
- org.apache.ignite.internal.processors.bulkload.pipeline.PipelineBlock<byte[],char[]>
-
- org.apache.ignite.internal.processors.bulkload.pipeline.CharsetDecoderBlock
-
public class CharsetDecoderBlock extends PipelineBlock<byte[],char[]>
APipelineBlock, which converts stream of bytes supplied as byte[] arrays to an array of char[] using the specified encoding. Decoding errors (malformed input and unmappable characters) are to handled by dropping the erroneous input, appending the coder's replacement value to the output buffer, and resuming the coding operation.
-
-
Field Summary
Fields Modifier and Type Field Description static char[]EMPTY_PORTIONEmpty portion.
-
Constructor Summary
Constructors Constructor Description CharsetDecoderBlock(Charset charset)Creates charset decoder block.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(byte[] data, boolean isLastAppend)Accepts a portion of input.-
Methods inherited from class org.apache.ignite.internal.processors.bulkload.pipeline.PipelineBlock
append
-
-
-
-
Constructor Detail
-
CharsetDecoderBlock
public CharsetDecoderBlock(Charset charset)
Creates charset decoder block.- Parameters:
charset- The charset encoding to decode bytes from.
-
-
Method Detail
-
accept
public void accept(byte[] data, boolean isLastAppend) throws IgniteCheckedExceptionAccepts a portion of input.isLastPortionparameter should be set if this is a last portion of the input. The method must not be called after the end of input: the call withisLastPortion == trueis the last one.- Specified by:
acceptin classPipelineBlock<byte[],char[]>- Parameters:
data- Portion of input.isLastAppend- Is this the last portion.- Throws:
IgniteCheckedException- On error.
-
-