Package org.apache.poi.poifs.nio
Class DataSource
java.lang.Object
org.apache.poi.poifs.nio.DataSource
- Direct Known Subclasses:
ByteArrayBackedDataSource
,FileBackedDataSource
Common definition of how we read and write bytes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Close the underlying streamabstract void
copyTo
(OutputStream stream) Copies the contents to the specified OutputStreamabstract ByteBuffer
read
(int length, long position) abstract long
size()
abstract void
write
(ByteBuffer src, long position)
-
Constructor Details
-
DataSource
public DataSource()
-
-
Method Details
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
size
- Throws:
IOException
-
close
Close the underlying stream- Throws:
IOException
-
copyTo
Copies the contents to the specified OutputStream- Throws:
IOException
-