Class WritableArchiveEntry
java.lang.Object
java.io.OutputStream
org.glassfish.api.deployment.archive.WritableArchiveEntry
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Archive entry used for the output.
- Author:
- David Matejcek
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Action to close the entry. -
Constructor Summary
ConstructorDescriptionWritableArchiveEntry
(Supplier<OutputStream> output, WritableArchiveEntry.CloseAction closeAction) -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write, write
-
Constructor Details
-
WritableArchiveEntry
public WritableArchiveEntry(Supplier<OutputStream> output, WritableArchiveEntry.CloseAction closeAction) - Parameters:
output
- provider of the output stream to write tocloseAction
- what should do the entry when it is closing.
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
getChannel
- Returns:
- output channel. No need to close it, it will be closed by the original provider.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-