com.bea.wli.management.internal
Class ByteArrayOutputStreamLimited
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
com.bea.wli.management.internal.ByteArrayOutputStreamLimited
- All Implemented Interfaces:
- Closeable, Flushable
public class ByteArrayOutputStreamLimited
- extends ByteArrayOutputStream
Internal use only. Allows output to a byte array up to a certain maximum size (in bytes). If the
size of the output exceeds throws an IndexOutOfBoundsException
Method Summary |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
ByteArrayOutputStreamLimited
public ByteArrayOutputStreamLimited(int hardLimit)
- Parameters:
hardLimit
- maximum number of bytes allowed to be output
write
public void write(int b)
- Overrides:
write
in class ByteArrayOutputStream
- Throws:
IndexOutOfBoundsException
- if the size of the output will exceed
the hard limit upon writing the new data
write
public void write(byte[] b,
int off,
int len)
- Overrides:
write
in class ByteArrayOutputStream
- Throws:
IndexOutOfBoundsException
- if the size of the output will exceed
the hard limit upon writing the new data
write
public void write(byte[] b)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IndexOutOfBoundsException
- if the size of the output will exceed
the hard limit upon writing the new data
IOException