public class MuxOutputStream
extends java.io.OutputStream
| Constructor and Description |
|---|
MuxOutputStream()
Null argument constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Complete writing to the stream, closing the channel.
|
void |
flush()
Flush data to the output stream.
|
int |
getChannel()
Gets the channel of the connection.
|
protected java.io.OutputStream |
getOutputStream()
Gets the raw output stream.
|
protected void |
init(MuxServer server,
int channel)
Initialize the multiplexor with input and output streams.
|
void |
write(byte[] buffer,
int offset,
int length)
Writes data to the output stream.
|
void |
write(int ch)
Writes a data byte to the output stream.
|
void |
writeURL(java.lang.String url)
Writes a URL to the stream.
|
protected void |
writeUTF(int code,
java.lang.String string)
Writes a UTF-8 string.
|
void |
yield()
Flush data to the output stream.
|
protected void init(MuxServer server, int channel) throws java.io.IOException
java.io.IOExceptionprotected java.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOExceptionpublic int getChannel()
public void writeURL(java.lang.String url)
throws java.io.IOException
java.io.IOExceptionpublic void write(int ch)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void yield()
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionprotected void writeUTF(int code,
java.lang.String string)
throws java.io.IOException
code - the HMUX code identifying the stringstring - the string to writejava.io.IOException