public class OutputStreamFunneler
extends java.lang.Object
OutputStreams to
 write to a single underlying stream, which is
 closed only when the last "funnel"
 has been closed.| Modifier and Type | Field and Description | 
|---|---|
| static long | DEFAULT_TIMEOUT_MILLISDefault timeout. | 
| Constructor and Description | 
|---|
| OutputStreamFunneler(java.io.OutputStream out)Create a new  OutputStreamFunnelerfor
 the specifiedOutputStream. | 
| OutputStreamFunneler(java.io.OutputStream out,
                    long timeoutMillis)Create a new  OutputStreamFunnelerfor
 the specifiedOutputStream, with the
 specified timeout value. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.io.OutputStream | getFunnelInstance()Get a "funnel"  OutputStreaminstance to
 write to thisOutputStreamFunneler's underlyingOutputStream. | 
| void | setTimeout(long timeoutMillis)Set the timeout for this  OutputStreamFunneler. | 
public static final long DEFAULT_TIMEOUT_MILLIS
setTimeout(long), 
Constant Field Valuespublic OutputStreamFunneler(java.io.OutputStream out)
OutputStreamFunneler for
 the specified OutputStream.out - OutputStream.public OutputStreamFunneler(java.io.OutputStream out,
                            long timeoutMillis)
OutputStreamFunneler for
 the specified OutputStream, with the
 specified timeout value.out - OutputStream.timeoutMillis - long.setTimeout(long)public void setTimeout(long timeoutMillis)
OutputStreamFunneler.
 This is the maximum time that may elapse between the closure
 of the last "funnel" and the next call to
 getOutputStream() without closing the
 underlying stream.timeoutMillis - long timeout value.public java.io.OutputStream getFunnelInstance()
                                       throws java.io.IOException
OutputStream instance to
 write to this OutputStreamFunneler's underlying
 OutputStream.OutputStream.java.io.IOException - if unable to create the funnel.