|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
com.tffenterprises.io.AccountingOutputStream
public class AccountingOutputStream
AccountingOutputStream
is a FilterOutputStream
that implements the
AccountingOutput
interface.
Field Summary | |
---|---|
private long |
written
Our register of written bytes. |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
AccountingOutputStream(java.io.OutputStream out)
Constructor, the standard for a FilterOutputStream subclass... |
Method Summary | |
---|---|
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at
offset off to this output stream. |
void |
write(int b)
Writes the specified byte to this output stream. |
long |
written()
Returns the number of bytes that have been written to the stream or file since the AccountingOutput instance was constructed. |
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private long written
Constructor Detail |
---|
public AccountingOutputStream(java.io.OutputStream out)
out
- the OutputStream to encapsulateMethod Detail |
---|
public long written()
public void write(byte[] b, int off, int len) throws java.io.IOException
len
bytes from the specified byte array starting at
offset off
to this output stream.
write
in class java.io.FilterOutputStream
b
- the byte array from which to copy bytes to the stream.off
- the offset at which to start reading bytes from b
.len
- the number of bytes to read from b
java.io.IOException
- if the underlying stream throws such an exception.public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
b
- the byte to be written to this output stream.
java.io.IOException
- if the underlying steram throws such an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |