public class TcpBufferedOutputStream extends java.io.FilterOutputStream implements TimeStampStream
| Constructor and Description |
|---|
TcpBufferedOutputStream(java.io.OutputStream out)
Constructor
|
TcpBufferedOutputStream(java.io.OutputStream out,
int size)
Creates a new buffered output stream to write data to the specified
underlying output stream with the specified buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close this stream
|
void |
flush()
flush the data to the output stream This doesn't call flush on the
underlying outputstream, because Tcp is particularly efficent at doing
this itself ....
|
long |
getWriteTimestamp() |
boolean |
isWriting() |
void |
write(byte[] b,
int off,
int len)
write a byte array to the stream
|
void |
write(int b)
write a byte on to the stream
|
public TcpBufferedOutputStream(java.io.OutputStream out)
out - public TcpBufferedOutputStream(java.io.OutputStream out,
int size)
out - the underlying output stream.size - the buffer size.java.lang.IllegalArgumentException - if size <= 0.public void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamb - - byte to writejava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamb - the byte bufferoff - the offset into the bufferlen - the length of data to writejava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOExceptionpublic boolean isWriting()
isWriting in interface TimeStampStreampublic long getWriteTimestamp()
getWriteTimestamp in interface TimeStampStreamCopyright © 2005-2014 Red Hat, Inc.. All Rights Reserved.