com.sun.codemodel.util
Class UnicodeEscapeWriter

java.lang.Object  extended by java.io.Writer      extended by java.io.FilterWriter          extended by com.sun.codemodel.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)


Field Summary
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
UnicodeEscapeWriter(Writer next)
           
 
Method Summary
protected  booleanrequireEscaping(int ch)
          Can be overrided.
 voidwrite(char[] buf)
           
 voidwrite(char[] buf, int off, int len)
           
 voidwrite(int ch)
           
 voidwrite(String buf)
           
 voidwrite(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
 

Constructor Detail

UnicodeEscapeWriter

public UnicodeEscapeWriter(Writer next)
Method Detail

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 © 2005-2011
Oracle. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14