Interface POIService

All Superinterfaces:
loci.common.services.Service
All Known Implementing Classes:
POIServiceImpl

public interface POIService extends loci.common.services.Service
Interface defining methods for reading Microsoft OLE2 documents using OME's fork of Apache POI.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the current POI file system.
    byte[]
    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.
    loci.common.RandomAccessInputStream
    Retrieve a RandomAccessInputStream corresponding to the given file name.
    int
    Retrieve the total number of bytes in the given file.
    Retrieve an InputStream corresponding to the given file name.
    void
    Construct a new POI filesystem around the given file.
    void
    initialize(loci.common.RandomAccessInputStream stream)
    Construct a new POI filesystem around the given stream.
  • Method Details

    • initialize

      void initialize(String file) throws IOException
      Construct a new POI filesystem around the given file.
      Throws:
      IOException - if an error occurred when opening the file.
    • initialize

      void initialize(loci.common.RandomAccessInputStream stream) throws IOException
      Construct a new POI filesystem around the given stream.
      Throws:
      IOException - if an error occurred when reading from the stream.
    • getInputStream

      InputStream getInputStream(String file) throws IOException
      Retrieve an InputStream corresponding to the given file name. Either of the 'initialize' methods must be called before this method.
      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

      loci.common.RandomAccessInputStream getDocumentStream(String file) throws IOException
      Retrieve a RandomAccessInputStream corresponding to the given file name. Either of the 'initialize' methods must be called before this method.
      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

      byte[] getDocumentBytes(String file) throws IOException
      Retrieve all of the raw bytes that correspond to the given file name. Either of the 'initialize' methods must be called before this method.
      Parameters:
      file - The name of the embedded file for which to retrieve bytes.
      Throws:
      IOException - if an error occurred when reading the file
    • getDocumentBytes

      byte[] getDocumentBytes(String file, int length) throws IOException
      Retrieve at most 'length' bytes that correspond to the given file name. Either of the 'initialize' methods must be called before this method.
      Parameters:
      file - The name of the embedded file for which to retrieve bytes.
      Throws:
      IOException - if an error occurred when reading the file
    • getFileSize

      int getFileSize(String file)
      Retrieve the total number of bytes in the given file. Either of the 'initialize' methods must be called before this method.
      Parameters:
      file - The name of the embedded file.
      Throws:
      IOException - if an error occurred when reading the file
    • getDocumentList

      Vector<String> getDocumentList()
      Retrieve a list of all files in the current POI file system.
    • close

      void close() throws IOException
      Close the current POI file system.
      Throws:
      IOException