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 DataSource
public void write(java.nio.ByteBuffer src, long position)
write
in class DataSource
public void copyTo(java.io.OutputStream stream) throws java.io.IOException
DataSource
copyTo
in class DataSource
java.io.IOException
public long size()
size
in class DataSource
public void close()
DataSource
close
in class DataSource
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.