public class UTF8Writer extends EncodingWriter
log
Constructor and Description |
---|
UTF8Writer()
Null-arg constructor for instantiation by com.caucho.vfs.Encoding only.
|
Modifier and Type | Method and Description |
---|---|
EncodingWriter |
create()
Returns the UTF8_Writer
|
EncodingWriter |
create(java.lang.String javaEncoding)
Returns the UTF8_Writer
|
java.lang.String |
getJavaEncoding()
Returns the Java encoding for the writer.
|
void |
write(ByteAppendable os,
char ch)
Writes a character to the output stream with the correct encoding.
|
int |
write(OutputStreamWithBuffer os,
char[] cbuf,
int off,
int len)
Writes into a character buffer using the correct encoding.
|
setJavaEncoding
public UTF8Writer()
public java.lang.String getJavaEncoding()
getJavaEncoding
in class EncodingWriter
public EncodingWriter create(java.lang.String javaEncoding)
create
in class EncodingWriter
javaEncoding
- the JDK name for the encoding.public EncodingWriter create()
create
in class EncodingWriter
public void write(ByteAppendable os, char ch) throws java.io.IOException
write
in class EncodingWriter
ch
- the character to write.java.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