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.IOException
protected java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
public int getChannel()
public void writeURL(java.lang.String url) throws java.io.IOException
java.io.IOException
public void write(int ch) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] buffer, int offset, int length) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void yield() throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
protected 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