org.browsermob.proxy.util
Class CappedByteArrayOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.browsermob.proxy.util.CappedByteArrayOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class CappedByteArrayOutputStream
- extends ByteArrayOutputStream
A special ByteArrayOutputStream that will only write up to X number of bytes, after which it will simply ignore the
rest. This is useful for solving a JVM heap starvation issue (see MOB-216).
|
Method Summary |
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
CappedByteArrayOutputStream
public CappedByteArrayOutputStream(int maxBytes)
write
public void write(int b)
- Overrides:
write in class ByteArrayOutputStream
write
public void write(byte[] b,
int off,
int len)
- Overrides:
write in class ByteArrayOutputStream
Copyright © 2011. All Rights Reserved.