|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.sun.jersey.api.client.CommittingOutputStream
public abstract class CommittingOutputStream
A commiting output stream that commits before
the first byte is written to the adapted OutputStream
.
This class may be overridden to provide the commit functionality.
Constructor Summary | |
---|---|
CommittingOutputStream()
Construct a new instance. |
|
CommittingOutputStream(OutputStream o)
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 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()
The method getOutputStream()
MUST be overridden
to return an output stream.
public CommittingOutputStream(OutputStream o)
o
- the adapted output stream.
IllegalArgumentException
- if o
is null.Method Detail |
---|
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
protected OutputStream getOutputStream() throws IOException
This method MUST be overriden if the empty constructor is utilized to construct an instance of this class.
IOException
protected abstract void commit() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |