|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream rabbit.io.MaxSizeOutputStream
A class that doesnt create outputstreams of more than a specified amount of data, the rest is simply swallowed
Constructor Summary | |
MaxSizeOutputStream(java.io.OutputStream os,
long l)
Creates a new MaxSizeOutputStream with a given limit and connects it to a given stream. |
Method Summary | |
void |
close()
Close this stream. |
void |
flush()
Write any pending data. |
static void |
main(java.lang.String[] args)
Simple self test |
void |
write(byte[] b)
Write a byte array to this stream. |
void |
write(byte[] b,
int off,
int len)
Write a byte array to this stream. |
void |
write(int b)
Write a byte to this stream. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MaxSizeOutputStream(java.io.OutputStream os, long l)
Method Detail |
public void write(int b) throws java.io.IOException
b
- the byte to write.
java.io.IOException
- if the underlying stream does.public void write(byte[] b) throws java.io.IOException
b
- the byte array to write.
java.io.IOException
- if the underlying stream does.public void write(byte[] b, int off, int len) throws java.io.IOException
b
- the byte to write.off
- the starting offset.len
- the number of bytes to write.
java.io.IOException
- if the underlying stream does.public void flush() throws java.io.IOException
java.io.IOException
- if the underlying stream does.public void close() throws java.io.IOException
java.io.IOException
- if the underlying stream does.public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |