com.sun.codemodel.util
Class UnicodeEscapeWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
com.sun.codemodel.util.UnicodeEscapeWriter
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable
public class UnicodeEscapeWriter
- extends java.io.FilterWriter
Writer
that escapes non US-ASCII characters into
Java Unicode escape \\uXXXX.
This process is necessary if the method names or field names
contain non US-ASCII characters.
- Author:
- Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
Fields inherited from class java.io.FilterWriter |
out |
Fields inherited from class java.io.Writer |
lock |
Method Summary |
protected boolean |
requireEscaping(int ch)
Can be overrided. |
void |
write(char[] buf)
|
void |
write(char[] buf,
int off,
int len)
|
void |
write(int ch)
|
void |
write(java.lang.String buf)
|
void |
write(java.lang.String buf,
int off,
int len)
|
Methods inherited from class java.io.FilterWriter |
close, flush |
Methods inherited from class java.io.Writer |
append, append, append |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnicodeEscapeWriter
public UnicodeEscapeWriter(java.io.Writer next)
write
public final void write(int ch)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterWriter
- Throws:
java.io.IOException
requireEscaping
protected boolean requireEscaping(int ch)
- Can be overrided. Return true if the character
needs to be escaped.
write
public final void write(char[] buf,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterWriter
- Throws:
java.io.IOException
write
public final void write(char[] buf)
throws java.io.IOException
- Overrides:
write
in class java.io.Writer
- Throws:
java.io.IOException
write
public final void write(java.lang.String buf,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterWriter
- Throws:
java.io.IOException
write
public final void write(java.lang.String buf)
throws java.io.IOException
- Overrides:
write
in class java.io.Writer
- Throws:
java.io.IOException
Copyright © 2005-2010 Sun Microsystems. All Rights Reserved.