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
DataSource
read
in interface DataSource
IOException
- if an I/O error occurs.public void close() throws IOException
DataSource
close
in interface DataSource
IOException
- if an I/O error occurs.public long totalSize()
DataSource
totalSize
in interface DataSource
Copyright © 2016. All rights reserved.