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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAction to close the entry. -
Constructor Summary
ConstructorsConstructorDescriptionWritableArchiveEntry(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:
writein classOutputStream- Throws:
IOException
-
getChannel
- Returns:
- output channel. No need to close it, it will be closed by the original provider.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-