public class FastPipedOutputStream
extends java.io.OutputStream
java.io.PipedOutputStream. In the
interface it only adds a constructor which allows for specifying the buffer
size. Its implementation, however, is much simpler and a lot more efficient
than its equivalent. It doesn't rely on polling. Instead it uses proper
synchronization with its counterpart FastPipedInputStream.FastPipedOutputStream| Constructor and Description |
|---|
FastPipedOutputStream()
Creates an unconnected PipedOutputStream.
|
FastPipedOutputStream(FastPipedInputStream sink)
Creates a PipedOutputStream with a default buffer size and connects it to
sink. |
FastPipedOutputStream(FastPipedInputStream sink,
int bufferSize)
Deprecated.
as of 1.350
bufferSize parameter is ignored.
|
public FastPipedOutputStream()
public FastPipedOutputStream(FastPipedInputStream sink) throws java.io.IOException
sink.java.io.IOException - It was already connected.public FastPipedOutputStream(FastPipedInputStream sink, int bufferSize) throws java.io.IOException
bufferSize and
connects it to sink.java.io.IOException - It was already connected.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException - The pipe is not connected.public void connect(FastPipedInputStream sink) throws java.io.IOException
java.io.IOException - The pipe is already connected.protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException - The pipe is not connected or a reader has closed it.Copyright © 2013. All Rights Reserved.