Package nl.b3p.commons.services
Class SizeLimitedOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.apache.commons.io.output.ProxyOutputStream
-
- org.apache.commons.io.output.CountingOutputStream
-
- nl.b3p.commons.services.SizeLimitedOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class SizeLimitedOutputStream extends org.apache.commons.io.output.CountingOutputStream
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description SizeLimitedOutputStream(OutputStream out)
SizeLimitedOutputStream(OutputStream out, long maxBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class org.apache.commons.io.output.CountingOutputStream
beforeWrite, getByteCount, getCount, resetByteCount, resetCount
-
Methods inherited from class org.apache.commons.io.output.ProxyOutputStream
afterWrite, close, flush, handleIOException
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
SizeLimitedOutputStream
public SizeLimitedOutputStream(OutputStream out)
-
SizeLimitedOutputStream
public SizeLimitedOutputStream(OutputStream out, long maxBytes)
-
-
Method Detail
-
write
public void write(byte[] b) throws IOException
- Overrides:
write
in classorg.apache.commons.io.output.ProxyOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classorg.apache.commons.io.output.ProxyOutputStream
- Throws:
IOException
-
write
public void write(int b) throws IOException
- Overrides:
write
in classorg.apache.commons.io.output.ProxyOutputStream
- Throws:
IOException
-
-