DataSourcepublic class DataSourceStream extends Object implements DataSource
| Modifier and Type | Field | Description |
|---|---|---|
protected int |
bufferSize |
|
protected InputStream |
in |
|
protected long |
totalRead |
| Constructor | Description |
|---|---|
DataSourceStream(InputStream in) |
|
DataSourceStream(InputStream in,
int bufferSize) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes this data source and releases any system
resources associated with this source.
|
Buffer |
read() |
Reads a data buffer from this data source.
|
long |
totalSize() |
Optional operation.
|
protected InputStream in
protected int bufferSize
protected long totalRead
public DataSourceStream(InputStream in)
public DataSourceStream(InputStream in, int bufferSize)
public Buffer read() throws IOException
DataSourceread in interface DataSourceIOException - if an I/O error occurs.public void close()
throws IOException
DataSourceclose in interface DataSourceIOException - if an I/O error occurs.public long totalSize()
DataSourcetotalSize in interface DataSourceCopyright © 2018. All rights reserved.