|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.apache.derby.iapi.services.io.CounterOutputStream
An OutputStream that simply provides methods to count the number of bytes written to an underlying stream.
Field Summary | |
private int |
count
|
private int |
limit
|
protected java.io.OutputStream |
out
|
Constructor Summary | |
CounterOutputStream()
Create a CounterOutputStream that will discard any bytes written but still coutn them and call its reset method so that the count is intially zero. |
Method Summary | |
int |
clearLimit()
Clear any limit set by setLimit. |
int |
getCount()
Get count of bytes written to the stream since the last reset() call. |
void |
setLimit(int limit)
Set a limit at which an exception will be thrown. |
void |
setOutputStream(java.io.OutputStream out)
|
void |
write(byte[] b)
Add b.length to the count. |
void |
write(byte[] b,
int off,
int len)
Add len to the count, discard the data. |
void |
write(int b)
Add 1 to the count. |
Methods inherited from class java.io.OutputStream |
close, flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.OutputStream out
private int count
private int limit
Constructor Detail |
public CounterOutputStream()
Method Detail |
public void setOutputStream(java.io.OutputStream out)
public int getCount()
public void setLimit(int limit)
setLimit
in interface Limit
EOFException
public int clearLimit()
Limit
clearLimit
in interface Limit
public void write(int b) throws java.io.IOException
java.io.IOException
OutputStream.write(int)
public void write(byte[] b) throws java.io.IOException
java.io.IOException
OutputStream.write(int)
public void write(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
OutputStream.write(int)
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |