org.jboss.jdeparser.util
Class UnicodeEscapeWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
org.jboss.jdeparser.util.UnicodeEscapeWriter
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public class UnicodeEscapeWriter
- extends 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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnicodeEscapeWriter
public UnicodeEscapeWriter(Writer next)
write
public final void write(int ch)
throws IOException
- Overrides:
write
in class FilterWriter
- Throws:
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 IOException
- Overrides:
write
in class FilterWriter
- Throws:
IOException
write
public final void write(char[] buf)
throws IOException
- Overrides:
write
in class Writer
- Throws:
IOException
write
public final void write(String buf,
int off,
int len)
throws IOException
- Overrides:
write
in class FilterWriter
- Throws:
IOException
write
public final void write(String buf)
throws IOException
- Overrides:
write
in class Writer
- Throws:
IOException
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.