|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.glassfish.jersey.message.internal.CommittingOutputStream
public final class CommittingOutputStream
An abstract committing output stream adapter that performs a commit and then retrieves the provided output stream
before the first byte is written to the provided stream.
Concrete implementations of the class typically override the commit operation
to perform any initialization on the adapted output stream.
| Constructor Summary | |
|---|---|
CommittingOutputStream()
Construct a new committing output stream using a deferred initialization of the adapted output stream via stream provider. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
boolean |
isCommitted()
Determines whether the stream was already committed or not. |
void |
setStreamProvider(OutboundMessageContext.StreamProvider streamProvider)
Set the output stream provider. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommittingOutputStream()
stream provider.
| Method Detail |
|---|
public void setStreamProvider(OutboundMessageContext.StreamProvider streamProvider)
streamProvider - output stream provider.public boolean isCommitted()
true if this stream was already committed, false otherwise.
public void write(byte[] b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public void write(int b)
throws IOException
write in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||