public class ByteArrayBackedDataSource extends DataSource
DataSource backed by a byte array.| Constructor and Description |
|---|
ByteArrayBackedDataSource(byte[] data) |
ByteArrayBackedDataSource(byte[] data,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying stream
|
void |
copyTo(OutputStream stream)
Copies the contents to the specified OutputStream
|
ByteBuffer |
read(int length,
long position) |
long |
size() |
void |
write(ByteBuffer src,
long position) |
public ByteArrayBackedDataSource(byte[] data,
int size)
public ByteArrayBackedDataSource(byte[] data)
public ByteBuffer read(int length, long position)
read in class DataSourcepublic void write(ByteBuffer src, long position)
write in class DataSourcepublic void copyTo(OutputStream stream) throws IOException
DataSourcecopyTo in class DataSourceIOExceptionpublic long size()
size in class DataSourcepublic void close()
DataSourceclose in class DataSourceCopyright © 2020. All rights reserved.