Package loci.formats.services
Class POIServiceImpl
java.lang.Object
loci.common.services.AbstractService
loci.formats.services.POIServiceImpl
- All Implemented Interfaces:
Service,POIService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the current POI file system.byte[]getDocumentBytes(String file) Retrieve all of the raw bytes that correspond to the given file name.byte[]getDocumentBytes(String file, int length) Retrieve at most 'length' bytes that correspond to the given file name.Retrieve a list of all files in the current POI file system.getDocumentStream(String file) Retrieve a RandomAccessInputStream corresponding to the given file name.intgetFileSize(String file) Retrieve the total number of bytes in the given file.getInputStream(String file) Retrieve an InputStream corresponding to the given file name.voidinitialize(String file) Construct a new POI filesystem around the given file.voidConstruct a new POI filesystem around the given stream.Methods inherited from class loci.common.services.AbstractService
checkClassDependency
-
Field Details
-
POI_MAGIC_BYTES
public static final int POI_MAGIC_BYTES- See Also:
-
-
Constructor Details
-
POIServiceImpl
public POIServiceImpl()Default constructor.
-
-
Method Details
-
initialize
Description copied from interface:POIServiceConstruct a new POI filesystem around the given file.- Specified by:
initializein interfacePOIService- Throws:
IOException- if an error occurred when opening the file.
-
initialize
Description copied from interface:POIServiceConstruct a new POI filesystem around the given stream.- Specified by:
initializein interfacePOIService- Throws:
IOException- if an error occurred when reading from the stream.
-
getInputStream
Description copied from interface:POIServiceRetrieve an InputStream corresponding to the given file name. Either of the 'initialize' methods must be called before this method.- Specified by:
getInputStreamin interfacePOIService- Parameters:
file- The name of the embedded file for which to retrieve an InputStream.- Throws:
IOException- if an error occurred when reading the file
-
getDocumentStream
Description copied from interface:POIServiceRetrieve a RandomAccessInputStream corresponding to the given file name. Either of the 'initialize' methods must be called before this method.- Specified by:
getDocumentStreamin interfacePOIService- Parameters:
file- The name of the embedded file for which to retrieve a RandomAccessInputStream.- Throws:
IOException- if an error occurred when reading the file
-
getDocumentBytes
Description copied from interface:POIServiceRetrieve all of the raw bytes that correspond to the given file name. Either of the 'initialize' methods must be called before this method.- Specified by:
getDocumentBytesin interfacePOIService- Parameters:
file- The name of the embedded file for which to retrieve bytes.- Throws:
IOException- if an error occurred when reading the file
-
getDocumentBytes
Description copied from interface:POIServiceRetrieve at most 'length' bytes that correspond to the given file name. Either of the 'initialize' methods must be called before this method.- Specified by:
getDocumentBytesin interfacePOIService- Parameters:
file- The name of the embedded file for which to retrieve bytes.- Throws:
IOException- if an error occurred when reading the file
-
getFileSize
Description copied from interface:POIServiceRetrieve the total number of bytes in the given file. Either of the 'initialize' methods must be called before this method.- Specified by:
getFileSizein interfacePOIService- Parameters:
file- The name of the embedded file.
-
getDocumentList
Description copied from interface:POIServiceRetrieve a list of all files in the current POI file system.- Specified by:
getDocumentListin interfacePOIService
-
close
Description copied from interface:POIServiceClose the current POI file system.- Specified by:
closein interfacePOIService- Throws:
IOException
-