Package org.apache.poi.poifs.nio
Class FileBackedDataSource
java.lang.Object
org.apache.poi.poifs.nio.DataSource
org.apache.poi.poifs.nio.FileBackedDataSource
A POIFS
DataSource backed by a File-
Constructor Summary
ConstructorsConstructorDescriptionFileBackedDataSource(File file) FileBackedDataSource(File file, boolean readOnly) FileBackedDataSource(RandomAccessFile srcFile, boolean readOnly) FileBackedDataSource(FileChannel channel, boolean readOnly) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the underlying streamvoidcopyTo(OutputStream stream) Copies the contents to the specified OutputStreambooleanread(int length, long position) longsize()voidwrite(ByteBuffer src, long position)
-
Constructor Details
-
FileBackedDataSource
- Throws:
FileNotFoundException
-
FileBackedDataSource
- Throws:
FileNotFoundException
-
FileBackedDataSource
-
FileBackedDataSource
-
-
Method Details
-
isWriteable
public boolean isWriteable() -
getChannel
-
read
- Specified by:
readin classDataSource- Throws:
IOException
-
write
- Specified by:
writein classDataSource- Throws:
IOException
-
copyTo
Description copied from class:DataSourceCopies the contents to the specified OutputStream- Specified by:
copyToin classDataSource- Throws:
IOException
-
size
- Specified by:
sizein classDataSource- Throws:
IOException
-
close
Description copied from class:DataSourceClose the underlying stream- Specified by:
closein classDataSource- Throws:
IOException
-