public class DataSourceStream extends Object implements DataSource
| Modifier and Type | Field and Description |
|---|---|
protected int |
bufferSize |
protected InputStream |
in |
protected long |
totalRead |
| Constructor and Description |
|---|
DataSourceStream(InputStream in) |
DataSourceStream(InputStream in,
int bufferSize) |
| Modifier and Type | Method and 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 © 2016. All rights reserved.