public class LimitedOutputStream extends FilterOutputStream
out| Constructor and Description |
|---|
LimitedOutputStream(OutputStream out,
int limit) |
| Modifier and Type | Method and Description |
|---|---|
int |
getComputedBytes() |
boolean |
isLimited() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
close, flush, writepublic LimitedOutputStream(OutputStream out, int limit)
out - an output stream that will receive the "trucated" stream.limit - a positive integer of the number of bytes to be passed to
the underlying streampublic void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic int getComputedBytes()
public boolean isLimited()
Copyright © 2008–2015. All rights reserved.