public interface FlushedCloseable extends Flushable, Closeable
Flushable.flush()
prior to close()
.
That way, Flushable.flush()
method is not called twice.
Usable by ClientRequestContext.setEntityStream(OutputStream)
.
Usable by ContainerResponseContext.setEntityStream(OutputStream)
.
This marker interface can be useful for the customer OutputStream to know the flush
did not come from
Jersey before close. By default, when the entity stream is to be closed by Jersey, flush
is called first.
Modifier and Type | Method and Description |
---|---|
void |
close()
Flushes this stream by writing any buffered output to the underlying stream.
|
void close() throws IOException
As noted in AutoCloseable.close()
, cases where the
close may fail require careful attention. It is strongly advised
to relinquish the underlying resources and to internally
mark the Closeable
as closed, prior to throwing
the IOException
.
close
in interface AutoCloseable
close
in interface Closeable
IOException
- if an I/O error occursCopyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.