public abstract class AbstractOnDemandInputStream<T extends OutputStream> extends InputStream
| Modifier and Type | Field and Description |
|---|---|
protected T |
outputStream
Created by abstract method.
|
| Constructor and Description |
|---|
AbstractOnDemandInputStream(Archive<?> archive)
Creates stream directly from archive.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
closeEntry(T outputStream)
Closes the current entry context for the specified
OutputStream. |
protected abstract T |
createOutputStream(OutputStream outputStream)
Creates the real
OutputStream to which we'll write, wrapping the provided target. |
protected abstract void |
putNextEntry(T outputStream,
String context,
Asset asset)
Writes the next entry (demarcates a new file/folder is to be written).
|
int |
read() |
available, close, mark, markSupported, read, read, reset, skipprotected T extends OutputStream outputStream
public AbstractOnDemandInputStream(Archive<?> archive)
archive - The archive from which the stream is createdpublic int read()
throws IOException
read in class InputStreamIOExceptionprotected abstract T createOutputStream(OutputStream outputStream) throws IOException
OutputStream to which we'll write, wrapping the provided target.outputStream - The underlying output stream to be wrappedIOException - If an error occurred in creating the streamprotected abstract void putNextEntry(T outputStream, String context, Asset asset) throws IOException
outputStream - The output stream to write tocontext - The context or path of the entryasset - The asset to be writtenIOException - If an error occurred writing the entryprotected abstract void closeEntry(T outputStream) throws IOException
OutputStream.outputStream - The output stream to close the entry forIOExceptionCopyright © 2024 JBoss by Red Hat. All rights reserved.