| Modifier and Type | Field and Description |
|---|---|
private int |
count |
private int |
limit |
protected java.io.OutputStream |
out |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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,
int off,
int len)
Add len to the count, discard the data.
|
void |
write(int b)
Add 1 to the count.
|
public CounterOutputStream()
public void setOutputStream(java.io.OutputStream out)
public int getCount()
public void setLimit(int limit)
public int clearLimit()
LimitclearLimit in interface Limitpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(int)public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(int)Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.