OutputStreams to
write to a single underlying stream, which is
closed only when the last "funnel"
has been closed.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private int | |
| public static final long | DEFAULT_TIMEOUT_MILLIS
Default timeout. |
| private OutputStream | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | OutputStreamFunneler(OutputStream
OutputStream.Create a new |
| public | OutputStreamFunneler(OutputStream
OutputStream.long.Create a new |
| Modifier and Type | Method and Description |
|---|---|
| private synchronized void | |
| private synchronized void | |
| public synchronized OutputStream | Returns: OutputStream.Get a "funnel" |
| private synchronized void | |
| public synchronized void |
| closed | back to summary |
|---|---|
| private boolean closed | |
| count | back to summary |
|---|---|
| private int count | |
| DEFAULT_TIMEOUT_MILLIS | back to summary |
|---|---|
| public static final long DEFAULT_TIMEOUT_MILLIS Default timeout.
| |
| out | back to summary |
|---|---|
| private OutputStream out | |
| timeoutMillis | back to summary |
|---|---|
| private long timeoutMillis | |
| OutputStreamFunneler | back to summary |
|---|---|
| public OutputStreamFunneler(OutputStream out) Create a new
| |
| OutputStreamFunneler | back to summary |
|---|---|
| public OutputStreamFunneler(OutputStream out, long timeoutMillis) Create a new
| |
| close | back to summary |
|---|---|
| private synchronized void close() throws IOException | |
| dieIfClosed | back to summary |
|---|---|
| private synchronized void dieIfClosed() throws IOException | |
| getFunnelInstance | back to summary |
|---|---|
| public synchronized OutputStream getFunnelInstance() throws IOException Get a "funnel"
| |
| release | back to summary |
|---|---|
| private synchronized void release(OutputStreamFunneler. | |
| setTimeout | back to summary |
|---|---|
| public synchronized void setTimeout(long timeoutMillis) Set the timeout for this
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public void | flush()
Overrides java. Implements java. |
| public void | write(int
the b)byte.Implements abstract java. |
| public void | write(byte[]
the data. b)Overrides java. b.length bytes from the specified byte array
to this output stream.
|
| public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. len bytes from the specified byte array
starting at offset off to this output stream.
|
| closed | back to summary |
|---|---|
| private boolean closed | |
| Funnel | back to summary |
|---|---|
| private Funnel() | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Doc from java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |