|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.util.logging.FileHandler.MeasureOutputStream
static class FileHandler.MeasureOutputStream
This output stream use decorator pattern to add measure feature to OutputStream which can detect the total size(in bytes) of output, the initial size can be set
| Field Summary | |
|---|---|
(package private) long |
length
|
(package private) OutputStream |
wrapped
|
| Constructor Summary | |
|---|---|
FileHandler.MeasureOutputStream(OutputStream stream)
|
|
FileHandler.MeasureOutputStream(OutputStream stream,
long currentLength)
|
|
| Method Summary | |
|---|---|
void |
close()
Close this OutputStream. |
void |
flush()
Flush this OutputStream. |
long |
getLength()
|
void |
setLength(long newLength)
|
void |
write(byte[] bytes)
Writes the entire contents of the byte array buffer to
this OutputStream. |
void |
write(byte[] b,
int off,
int len)
Writes count bytes from the byte array
buffer starting at offset to this
OutputStream. |
void |
write(int oneByte)
Writes the specified byte oneByte to this OutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
OutputStream wrapped
long length
| Constructor Detail |
|---|
public FileHandler.MeasureOutputStream(OutputStream stream,
long currentLength)
public FileHandler.MeasureOutputStream(OutputStream stream)
| Method Detail |
|---|
public void write(int oneByte)
throws IOException
OutputStreamoneByte to this OutputStream.
Only the low order byte of oneByte is written.
write in class OutputStreamoneByte - the byte to be written
IOException - If an error occurs attempting to write to this OutputStream.
public void write(byte[] bytes)
throws IOException
OutputStreambuffer to
this OutputStream.
write in class OutputStreambytes - the buffer to be written
IOException - If an error occurs attempting to write to this OutputStream.
public void write(byte[] b,
int off,
int len)
throws IOException
OutputStreamcount bytes from the byte array
buffer starting at offset to this
OutputStream.
write in class OutputStreamb - the buffer to be writtenoff - offset in buffer to get byteslen - number of bytes in buffer to write
IOException - If an error occurs attempting to write to this OutputStream.
public void close()
throws IOException
OutputStream
close in interface Closeableclose in class OutputStreamIOException - If an error occurs attempting to close this OutputStream.
public void flush()
throws IOException
OutputStream
flush in interface Flushableflush in class OutputStreamIOException - If an error occurs attempting to flush this OutputStream.public long getLength()
public void setLength(long newLength)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||