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, write
public 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 FilterOutputStream
IOException
public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public int getComputedBytes()
public boolean isLimited()
Copyright © 2008–2015. All rights reserved.