public class DecodingInputStream extends FilterInputStream
Decoder
such that consumers obtain raw (decoded) bytes from read operations.in
Constructor and Description |
---|
DecodingInputStream(InputStream in,
Decoder d)
Creates a new instance that wraps the given stream and performs decoding using the given encoder component.
|
Modifier and Type | Method and Description |
---|---|
static DecodingInputStream |
base64(InputStream in)
Creates a new instance that decodes base64 input from the given stream.
|
static DecodingInputStream |
hex(InputStream in)
Creates a new instance that decodes hexadecimal input from the given stream.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
available, close, mark, markSupported, reset, skip
public DecodingInputStream(InputStream in, Decoder d)
in
- Input stream to wrap.d
- Decoder that provides on-the-fly decoding.public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public static DecodingInputStream base64(InputStream in)
in
- Wrapped input stream.public static DecodingInputStream hex(InputStream in)
in
- Wrapped input stream.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.