org.tromer.jie
Class UnicodeOutputStreamWriter
java.lang.Object
|
+--java.io.Writer
|
+--org.tromer.jie.UnicodeOutputStreamWriter
- public class UnicodeOutputStreamWriter
- extends java.io.Writer
Variant of OutputStreamWriter
that converts any
non-printable or non-ASCII characters
characters to Java-style Unicode escape codes.
This implementation is significantly more efficient than
OutputStreamWriter
, since it does not carry out complex
conversion operations.
Fields inherited from class java.io.Writer |
lock |
Method Summary |
void |
close()
Close the stream. |
void |
flush()
Flush the stream. |
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters. |
void |
write(int c)
Write a single character. |
void |
write(java.lang.String str,
int off,
int len)
Write a portion of a string. |
Methods inherited from class java.io.Writer |
write,
write |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
UnicodeOutputStreamWriter
public UnicodeOutputStreamWriter(java.io.OutputStream out)
write
public void write(int c)
throws java.io.IOException
- Write a single character.
- Overrides:
- write in class java.io.Writer
write
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Write a portion of an array of characters.
- Overrides:
- write in class java.io.Writer
- Parameters:
cbuf
- Buffer of charactersoff
- Offset from which to start writing characterslen
- Number of characters to write
write
public void write(java.lang.String str,
int off,
int len)
throws java.io.IOException
- Write a portion of a string.
- Overrides:
- write in class java.io.Writer
- Parameters:
str
- A Stringoff
- Offset from which to start writing characterslen
- Number of characters to write- Throws:
- java.io.IOException - If an I/O error occurs
flush
public void flush()
throws java.io.IOException
- Flush the stream.
- Overrides:
- flush in class java.io.Writer
- Throws:
- java.io.IOException - If an I/O error occurs
close
public void close()
throws java.io.IOException
- Close the stream.
- Overrides:
- close in class java.io.Writer
- Throws:
- java.io.IOException - If an I/O error occurs