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 DataSource
public void write(ByteBuffer src, long position)
write
in class DataSource
public void copyTo(OutputStream stream) throws IOException
DataSource
copyTo
in class DataSource
IOException
public long size()
size
in class DataSource
public void close()
DataSource
close
in class DataSource
Copyright © 2020. All rights reserved.