Class AbstractOnDemandInputStream<T extends OutputStream>

    • Field Detail

      • outputStream

        protected T extends OutputStream outputStream
        Created by abstract method.
    • Constructor Detail

      • AbstractOnDemandInputStream

        public AbstractOnDemandInputStream​(Archive<?> archive)
        Creates stream directly from archive.
        Parameters:
        archive -
    • Method Detail

      • createOutputStream

        protected abstract T createOutputStream​(OutputStream outputStream)
                                         throws IOException
        Creates the real OutputStream to which we'll write, wrapping the provided target.
        Parameters:
        outputStream -
        Returns:
        Throws:
        IOException - If an error occurred in creating the stream
      • putNextEntry

        protected abstract void putNextEntry​(T outputStream,
                                             String context,
                                             Asset asset)
                                      throws IOException
        Writes the next entry (demarcates a new file/folder is to be written).
        Parameters:
        outputStream -
        context -
        Throws:
        IOException - If an error occurred writing the entry
      • closeEntry

        protected abstract void closeEntry​(T outputStream)
                                    throws IOException
        Closes the current entry context for the specified OutputStream.
        Parameters:
        outputStream -
        Throws:
        IOException