public class CachedWriter extends Writer
| Modifier and Type | Field and Description |
|---|---|
protected Writer |
currentStream |
protected boolean |
outputLocked |
| Constructor and Description |
|---|
CachedWriter() |
CachedWriter(long threshold) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deregisterCallback(CachedWriterCallback 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 ... etc.)
|
boolean |
equals(Object obj) |
void |
flush() |
List<CachedWriterCallback> |
getCallbacks() |
char[] |
getChars() |
Writer |
getOut() |
Reader |
getReader() |
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(CachedWriterCallback cb) |
void |
releaseTempFileHold() |
void |
resetOut(Writer out,
boolean copyOldContent)
Replace the original stream with the new one, optionally copying the content of the old one
into the new one.
|
void |
setCipherTransformation(String cipherTransformation) |
static void |
setDefaultCipherTransformation(String n) |
static void |
setDefaultMaxSize(long l) |
static void |
setDefaultThreshold(int i) |
void |
setMaxSize(long maxSize) |
void |
setOutputDir(File outputDir) |
void |
setThreshold(long threshold) |
long |
size() |
String |
toString() |
void |
write(char[] cbuf,
int off,
int len) |
void |
writeCacheTo(StringBuilder out) |
void |
writeCacheTo(StringBuilder out,
long limit) |
void |
writeCacheTo(Writer out) |
protected boolean outputLocked
protected Writer currentStream
public CachedWriter()
public CachedWriter(long threshold)
public void holdTempFile()
public void releaseTempFileHold()
public void registerCallback(CachedWriterCallback cb)
public void deregisterCallback(CachedWriterCallback cb)
public List<CachedWriterCallback> getCallbacks()
protected void doFlush()
throws IOException
IOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionprotected void doClose()
throws IOException
IOExceptionprotected void postClose()
throws IOException
IOExceptionpublic void lockOutputStream()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOExceptionpublic void resetOut(Writer out, boolean copyOldContent) throws IOException
out - the new output streamcopyOldContent - flag indicating if the old content should be copiedIOExceptionpublic long size()
public char[] getChars()
throws IOException
IOExceptionpublic void writeCacheTo(Writer out) throws IOException
IOExceptionpublic void writeCacheTo(StringBuilder out, long limit) throws IOException
IOExceptionpublic void writeCacheTo(StringBuilder out) throws IOException
IOExceptionpublic Writer getOut()
protected void onWrite()
throws IOException
IOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionpublic File getTempFile()
public Reader getReader() throws IOException
IOExceptionpublic void setOutputDir(File outputDir) throws IOException
IOExceptionpublic void setThreshold(long threshold)
public void setMaxSize(long maxSize)
public void setCipherTransformation(String cipherTransformation)
public static void setDefaultMaxSize(long l)
public static void setDefaultThreshold(int i)
public static void setDefaultCipherTransformation(String n)
Apache CXF