public class ServerWriter extends OutputStreamWriter
Writer
.Constructor and Description |
---|
ServerWriter(ServerOutputStream outputStream,
Charset charset,
Object lock)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
void |
write(byte[] encodedBytes)
Enables writing encoded bytes.
|
void |
write(ByteBuffer encodedBytes)
Enables writing encoded bytes.
|
close, flush, getEncoding, write, write, write
public ServerWriter(ServerOutputStream outputStream, Charset charset, Object lock)
outputStream
- ServerOutputStream
.charset
- Charset
.lock
- Lock for synchronize
.public final void write(byte[] encodedBytes) throws IOException
Enables writing encoded bytes.
Caution should also be taken to ensure that previous written content is not waiting for further surrogate characters.
encodedBytes
- Encoded bytes.IOException
- If fails to write the bytes.public final void write(ByteBuffer encodedBytes) throws IOException
Enables writing encoded bytes.
Caution should also be taken to ensure that previous written content is not waiting for further surrogate characters.
encodedBytes
- ByteBuffer
containing the encoded bytes.IOException
- If fails to write the bytes.Copyright © 2005–2016. All rights reserved.