public class UTF16Writer extends EncodingWriter
log
Constructor and Description |
---|
UTF16Writer()
Null-arg constructor for instantiation by com.caucho.vfs.Encoding only.
|
Modifier and Type | Method and Description |
---|---|
EncodingWriter |
create(java.lang.String javaEncoding)
Create a UTF-16 writer using on the WriteStream to send bytes.
|
void |
write(ByteAppendable os,
char ch)
Writes the character using the correct encoding.
|
int |
write(OutputStreamWithBuffer os,
char[] cbuf,
int off,
int len)
Writes a character buffer using the UTF-16 encoding.
|
create, getJavaEncoding, setJavaEncoding
public UTF16Writer()
public EncodingWriter create(java.lang.String javaEncoding)
create
in class EncodingWriter
javaEncoding
- the JDK name for the encoding.public void write(ByteAppendable os, char ch) throws java.io.IOException
write
in class EncodingWriter
ch
- the character to writejava.io.IOException
public int write(OutputStreamWithBuffer os, char[] cbuf, int off, int len) throws java.io.IOException
write
in class EncodingWriter
cbuf
- character array with the data to write.off
- starting offset into the character array.len
- the number of characters to write.java.io.IOException