|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
com.sun.faban.driver.transport.util.TimedOutputStream
public class TimedOutputStream
A pass-through output stream that records the time of the output. Note that the client-side time recording for writes is always before the write happens.
Field Summary |
---|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
TimedOutputStream(OutputStream out)
Creates an output stream filter built on top of the specified underlying output stream. |
Method Summary | |
---|---|
void |
write(byte[] b)
Writes b.length bytes to this output stream. |
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. |
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimedOutputStream(OutputStream out)
out
- the underlying output stream to be assigned to
the field this.out for later use, or
null
if this instance is to be
created without an underlying stream.Method Detail |
---|
public void write(int b) throws IOException
byte
to this output stream.
The write
method of FilterOutputStream
calls the write
method of its underlying output stream,
that is, it performs out.write(b).
Implements the abstract write method of OutputStream.
write
in class FilterOutputStream
b
- the byte
.
IOException
- IOException
if an I/O error occurs.public void write(byte[] b) throws IOException
b.length
bytes to this output stream.
The write
method of FilterOutputStream
calls its write
method of three arguments with the
arguments b
, 0
, and
b.length
.
Note that this method does not call the one-argument
write
method of its underlying stream with the single
argument b
.
write
in class FilterOutputStream
b
- the data to be written.
IOException
- IOException
if an I/O error occurs.FilterOutputStream.write(byte[], int, int)
public void write(byte[] b, int off, int len) throws IOException
len
bytes from the specified
byte
array starting at offset off
to
this output stream.
As suggested by the FilterOutputStream superclass, this method implements as more efficient task by calling the underlying output stream directly.
write
in class FilterOutputStream
b
- The bytes to writeoff
- The offset into the byte arraylen
- The length to write
IOException
- If there is an error writing
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |