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(java.io.OutputStream stream)
Copies the contents to the specified OutputStream
|
java.nio.ByteBuffer |
read(int length,
long position) |
long |
size() |
void |
write(java.nio.ByteBuffer src,
long position) |
public ByteArrayBackedDataSource(byte[] data,
int size)
public ByteArrayBackedDataSource(byte[] data)
public java.nio.ByteBuffer read(int length,
long position)
read in class DataSourcepublic void write(java.nio.ByteBuffer src,
long position)
write in class DataSourcepublic void copyTo(java.io.OutputStream stream)
throws java.io.IOException
DataSourcecopyTo in class DataSourcejava.io.IOExceptionpublic long size()
size in class DataSourcepublic void close()
DataSourceclose in class DataSourceCopyright 2018 The Apache Software Foundation or its licensors, as applicable.