org.apache.ignite.internal.processors.bulkload.pipeline

## 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[]>

A `PipelineBlock`, 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
`static char[]` `EMPTY_PORTION` Empty portion.

### Constructor Summary

Constructors
Constructor and Description
`CharsetDecoderBlock(Charset charset)` Creates charset decoder block.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `accept(byte[] data, boolean isLastAppend)` Accepts a portion of input.

### Methods inherited from class org.apache.ignite.internal.processors.bulkload.pipeline.PipelineBlock

`append`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### EMPTY_PORTION

    public static final char[] EMPTY_PORTION

Empty portion.

### 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 IgniteCheckedException

Accepts a portion of input. `isLastPortion` parameter 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 with `isLastPortion == true` is the last one.

Specified by:
  `accept` in class `PipelineBlock<byte[],char[]>`
Parameters:
  `data` - Portion of input.
  `isLastAppend` - Is this the last portion.
Throws:
  `IgniteCheckedException` - On error.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020