public class MuxOutputStream extends 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 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(String url)
Writes a URL to the stream.
|
protected void |
writeUTF(int code,
String string)
Writes a UTF-8 string.
|
void |
yield()
Flush data to the output stream.
|
write
protected void init(MuxServer server, int channel) throws IOException
IOException
protected OutputStream getOutputStream() throws IOException
IOException
public int getChannel()
public void writeURL(String url) throws IOException
IOException
public void write(int ch) throws IOException
write
in class OutputStream
IOException
public void write(byte[] buffer, int offset, int length) throws IOException
write
in class OutputStream
IOException
public void yield() throws IOException
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
protected void writeUTF(int code, String string) throws IOException
code
- the HMUX code identifying the stringstring
- the string to writeIOException
Copyright © 2023. All rights reserved.