java.io.Closeable
, java.io.Flushable
, java.lang.AutoCloseable
public class DemuxOutputStream
extends java.io.OutputStream
Modifier and Type | Field | Description |
---|---|---|
private java.lang.InheritableThreadLocal<java.io.OutputStream> |
m_streams |
Constructor | Description |
---|---|
DemuxOutputStream() |
Modifier and Type | Method | Description |
---|---|---|
java.io.OutputStream |
bindStream(java.io.OutputStream output) |
Bind the specified stream to the current thread.
|
void |
close() |
Closes stream associated with current thread.
|
void |
flush() |
Flushes stream associated with current thread.
|
void |
write(int ch) |
Writes byte to stream associated with current thread.
|
private final java.lang.InheritableThreadLocal<java.io.OutputStream> m_streams
public java.io.OutputStream bindStream(java.io.OutputStream output)
output
- the stream to bindpublic void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
- if an error occurspublic void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if an error occurspublic void write(int ch) throws java.io.IOException
write
in class java.io.OutputStream
ch
- the byte to write to streamjava.io.IOException
- if an error occursCopyright (c) 2002-2017 Apache Software Foundation