public class StreamingInputStream extends InputStream
This class provides a way to connect APIs expecting an InputStream with data sources encapsulated in StreamingDataInput instances.
StreamingDataInput
,
InputStream
Constructor and Description |
---|
StreamingInputStream()
Constructs a new StreamingInputStream instance and initializes the data source as an empty ByteStore.
|
StreamingInputStream(StreamingDataInput in)
Constructs a new StreamingInputStream instance with a specific StreamingDataInput as the data source.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
@NotNull StreamingInputStream |
init(StreamingDataInput in)
Initializes this StreamingInputStream instance with a specific StreamingDataInput as the data source.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long n) |
close, mark, markSupported, read, reset
public StreamingInputStream()
public StreamingInputStream(StreamingDataInput in)
in
- the StreamingDataInput instance to read data from.@NotNull public @NotNull StreamingInputStream init(StreamingDataInput in)
in
- the StreamingDataInput instance to read data from.public long skip(long n) throws IOException
skip
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
Copyright © 2023. All rights reserved.