|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream com.sun.jersey.api.client.CommittingOutputStream
public abstract class CommittingOutputStream
A committing output stream that commits before the first byte is written to the adapted OutputStream
.
Constructor Summary | |
---|---|
CommittingOutputStream()
Construct a new instance. |
|
CommittingOutputStream(java.io.OutputStream adaptedOutput)
Construct a new instance with an output stream to adapt. |
Method Summary | |
---|---|
void |
close()
|
protected abstract void |
commit()
Perform the commit functionality. |
void |
flush()
|
protected java.io.OutputStream |
getOutputStream()
Get the adapted output stream. |
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()
getOutputStream()
MUST be overridden
to return an output stream.
public CommittingOutputStream(java.io.OutputStream adaptedOutput)
adaptedOutput
- the adapted output stream.
java.lang.IllegalArgumentException
- if adaptedOutput
is null.Method Detail |
---|
public void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
protected java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
- if obtaining of an output stream fails (e.g. connection problem).protected abstract void commit() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |