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, write
protected int threshold
protected LoadingByteArrayOutputStream buffer
public AbstractThresholdOutputStream(int threshold)
public abstract void thresholdReached() throws java.io.IOException
java.io.IOException
public abstract void thresholdNotReached() throws java.io.IOException
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class AbstractWrappedOutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class AbstractWrappedOutputStream
java.io.IOException
public void unBuffer() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class AbstractWrappedOutputStream
java.io.IOException