|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.apache.cxf.io.CachedOutputStream
public class CachedOutputStream
Field Summary | |
---|---|
protected java.io.OutputStream |
currentStream
|
protected boolean |
outputLocked
|
Constructor Summary | |
---|---|
CachedOutputStream()
|
|
CachedOutputStream(long threshold)
|
|
CachedOutputStream(java.io.PipedInputStream stream)
|
Method Summary | |
---|---|
void |
close()
|
static void |
copyStream(java.io.InputStream in,
java.io.OutputStream out,
int bufferSize)
|
void |
deregisterCallback(CachedOutputStreamCallback cb)
|
protected void |
doClose()
Perform any actions required on stream closure (handle response etc.) |
protected void |
doFlush()
Perform any actions required on stream flush (freeze headers, reset output stream ... |
boolean |
equals(java.lang.Object obj)
|
void |
flush()
|
byte[] |
getBytes()
|
java.util.List<CachedOutputStreamCallback> |
getCallbacks()
|
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOut()
|
java.io.File |
getTempFile()
|
int |
hashCode()
|
void |
holdTempFile()
|
void |
lockOutputStream()
Locks the output stream to prevent additional writes, but maintains a pointer to it so an InputStream can be obtained |
protected void |
onWrite()
|
protected void |
postClose()
Perform any actions required after stream closure (close the other related stream etc.) |
void |
registerCallback(CachedOutputStreamCallback cb)
|
void |
releaseTempFileHold()
|
void |
resetOut(java.io.OutputStream out,
boolean copyOldContent)
Replace the original stream with the new one, optionally copying the content of the old one into the new one. |
void |
setOutputDir(java.io.File outputDir)
|
void |
setThreshold(long threshold)
|
int |
size()
|
java.lang.String |
toString()
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
void |
writeCacheTo(java.io.OutputStream out)
|
void |
writeCacheTo(java.lang.StringBuilder out)
|
void |
writeCacheTo(java.lang.StringBuilder out,
int limit)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean outputLocked
protected java.io.OutputStream currentStream
Constructor Detail |
---|
public CachedOutputStream(java.io.PipedInputStream stream) throws java.io.IOException
java.io.IOException
public CachedOutputStream()
public CachedOutputStream(long threshold)
Method Detail |
---|
public void holdTempFile()
public void releaseTempFileHold()
public void registerCallback(CachedOutputStreamCallback cb)
public void deregisterCallback(CachedOutputStreamCallback cb)
public java.util.List<CachedOutputStreamCallback> getCallbacks()
protected void doFlush() throws java.io.IOException
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
protected void doClose() throws java.io.IOException
java.io.IOException
protected void postClose() throws java.io.IOException
java.io.IOException
public void lockOutputStream() throws java.io.IOException
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
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void resetOut(java.io.OutputStream out, boolean copyOldContent) throws java.io.IOException
out
- the new output streamcopyOldContent
- flag indicating if the old content should be copied
java.io.IOException
public static void copyStream(java.io.InputStream in, java.io.OutputStream out, int bufferSize) throws java.io.IOException
java.io.IOException
public int size()
public byte[] getBytes() throws java.io.IOException
java.io.IOException
public void writeCacheTo(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public void writeCacheTo(java.lang.StringBuilder out, int limit) throws java.io.IOException
java.io.IOException
public void writeCacheTo(java.lang.StringBuilder out) throws java.io.IOException
java.io.IOException
public java.io.OutputStream getOut()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected void onWrite() throws java.io.IOException
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(byte[] b) 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 java.io.File getTempFile()
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public void setOutputDir(java.io.File outputDir) throws java.io.IOException
java.io.IOException
public void setThreshold(long threshold)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |