public abstract class AbstractThresholdOutputStream extends AbstractWrappedOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected LoadingByteArrayOutputStream |
buffer |
protected int |
threshold |
allowFlush, wrappedStream, written| Constructor and Description |
|---|
AbstractThresholdOutputStream(int threshold) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
abstract void |
thresholdNotReached() |
abstract void |
thresholdReached() |
void |
unBuffer() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
allowFlush, flush, onFirstWrite, writeprotected int threshold
protected LoadingByteArrayOutputStream buffer
public AbstractThresholdOutputStream(int threshold)
public abstract void thresholdReached()
throws java.io.IOException
java.io.IOExceptionpublic abstract void thresholdNotReached()
throws java.io.IOException
java.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class AbstractWrappedOutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class AbstractWrappedOutputStreamjava.io.IOExceptionpublic void unBuffer()
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 AbstractWrappedOutputStreamjava.io.IOException