com.amazon.ion.system.IonReaderBuilder when creating an
IonReader over a user-provided stream. This allows users to transform a stream's raw bytes into
valid text or binary Ion.
com.amazon.ion.system.IonReaderBuilder#addInputStreamInterceptor(InputStreamInterceptor) , com.amazon.ion.system.IonSystemBuilder#withReaderBuilder(IonReaderBuilder)
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public boolean | Returns: true if the candidate byte sequence matches; otherwise, false.the candidate byte sequence. candidate, int the offset into the candidate bytes to begin matching. offset, int the number of bytes (beginning at 'offset') in `candidate`. Must be greater than or equal to
length)numberOfBytesNeededToDetermineMatch().Determines whether the given candidate byte sequence matches this format. |
| public InputStream | Returns: a new InputStream.the stream containing bytes in this format. interceptedStream)Creates a new InputStream that transforms the bytes in the given InputStream into valid text or binary Ion. |
| public int | Returns: the length in bytes.The number of bytes required to be read from the beginning of the stream in order to determine whether it matches the format relevant to this interceptor. |
| formatName | back to summary |
|---|---|
| public String formatName() The name of the format the interceptor recognizes.
| |
| isMatch | back to summary |
|---|---|
| public boolean isMatch(byte[] candidate, int offset, int length) Determines whether the given candidate byte sequence matches this format.
| |
| newInputStream | back to summary |
|---|---|
| public InputStream newInputStream(InputStream interceptedStream) throws IOException Creates a new InputStream that transforms the bytes in the given InputStream into valid text or binary Ion.
| |
| numberOfBytesNeededToDetermineMatch | back to summary |
|---|---|
| public int numberOfBytesNeededToDetermineMatch() The number of bytes required to be read from the beginning of the stream in order to determine whether
it matches the format relevant to this interceptor. If a stream contains fewer than the number of bytes
returned by this method, then this interceptor will not be considered a match and
| |