public class DeferredFileOutputStream extends ThresholdingOutputStream
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TMPFILE_PREFIX |
static java.lang.String |
TMPFILE_SUFFIX |
output| Constructor and Description |
|---|
DeferredFileOutputStream(int transitionSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.io.InputStream |
getInputStream()
Closes the output stream and creates an InputStream on the same data.
|
protected void |
thresholdReached(int current,
int predicted)
Called when the threshold is about to be exceeded.
|
checkThreshold, flush, getThreshold, write, write, writepublic static final java.lang.String TMPFILE_PREFIX
public static final java.lang.String TMPFILE_SUFFIX
public DeferredFileOutputStream(int transitionSize)
transitionSize - is the number of bytes at which to convert
from a byte array to a real file.protected void thresholdReached(int current,
int predicted)
throws java.io.IOException
ThresholdingOutputStreamthresholdReached in class ThresholdingOutputStreamcurrent - is the current number of bytes that have been writtenpredicted - is the total number after the write completesjava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class ThresholdingOutputStreamjava.io.IOExceptionCopyright © 2006-2013. All Rights Reserved.