Class ZipEntryBlob

    • Field Detail

      • zipFile

        protected final ZipFile zipFile
      • zipEntry

        protected final ZipEntry zipEntry
      • zipBlob

        protected final Blob zipBlob
      • entryName

        protected final String entryName
    • Constructor Detail

      • ZipEntryBlob

        public ZipEntryBlob​(ZipFile zipFile,
                            ZipEntry zipEntry)
        Creates a Blob from an entry in a zip file. The ZipFile must not be closed until the stream has been read.
        Parameters:
        zipFile - the zip file
        zipEntry - the zip entry
      • ZipEntryBlob

        public ZipEntryBlob​(Blob zipBlob,
                            String entryName)
        Creates a Blob from an entry in a ZIP file blob.
        Parameters:
        zipBlob - the ZIP file blob
        entryName - the ZIP entry name
        Since:
        11.5
    • Method Detail

      • getStream

        public InputStream getStream()
                              throws IOException
        Description copied from interface: Blob
        Gets an InputStream for the data of this blob.

        The contract of Blob is that this method can be called several times and will correctly return a new InputStream each time. In other words, several reads of the Blob can be done.

        Like all InputStream, the result must be closed when done with it to avoid resource leaks.

        Specified by:
        getStream in interface Blob
        Returns:
        the stream
        Throws:
        IOException
      • getLength

        public long getLength()
        Description copied from interface: Blob
        Gets the data length in bytes if known.
        Specified by:
        getLength in interface Blob
        Overrides:
        getLength in class AbstractBlob
        Returns:
        the data length or -1 if not known