org.apache.poi.poifs.nio
Class ByteArrayBackedDataSource
- java.lang.Object
-
- org.apache.poi.poifs.nio.DataSource
-
- org.apache.poi.poifs.nio.ByteArrayBackedDataSource
-
public class ByteArrayBackedDataSource extends DataSource
A POIFSDataSourcebacked by a byte array.
-
-
Constructor Summary
Constructors Constructor and Description ByteArrayBackedDataSource(byte[] data)ByteArrayBackedDataSource(byte[] data, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close the underlying streamvoidcopyTo(java.io.OutputStream stream)Copies the contents to the specified OutputStreamjava.nio.ByteBufferread(int length, long position)longsize()voidwrite(java.nio.ByteBuffer src, long position)
-
-
-
Constructor Detail
-
ByteArrayBackedDataSource
public ByteArrayBackedDataSource(byte[] data, int size)
-
ByteArrayBackedDataSource
public ByteArrayBackedDataSource(byte[] data)
-
-
Method Detail
-
read
public java.nio.ByteBuffer read(int length, long position)- Specified by:
readin classDataSource
-
write
public void write(java.nio.ByteBuffer src, long position)- Specified by:
writein classDataSource
-
copyTo
public void copyTo(java.io.OutputStream stream) throws java.io.IOExceptionDescription copied from class:DataSourceCopies the contents to the specified OutputStream- Specified by:
copyToin classDataSource- Throws:
java.io.IOException
-
size
public long size()
- Specified by:
sizein classDataSource
-
close
public void close()
Description copied from class:DataSourceClose the underlying stream- Specified by:
closein classDataSource
-
-
DataMelt 3.0 © DataMelt by jWork.ORG