|
Apache CXF API | |||||||||
| 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.IOExceptionpublic 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.Flushableflush in class java.io.OutputStreamjava.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.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionpublic 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.IOExceptionpublic 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.IOExceptionpublic java.io.OutputStream getOut()
public int hashCode()
hashCode in class java.lang.Objectpublic 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.OutputStreamjava.io.IOException
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic 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.IOExceptionpublic void setThreshold(long threshold)
|
Apache CXF API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||