public class NativeToAsciiFilter extends Object
Assuming the output is to be understood as ASCII, encode out internal java bytes above 127 as unicode escapes like \\uXXXX. Rework of the Sun open source code to use a StringBuffer instead of a stream.
| Modifier and Type | Field and Description |
|---|---|
(package private) String |
lineBreak |
(package private) StringBuffer |
out |
| Constructor and Description |
|---|
NativeToAsciiFilter() |
NativeToAsciiFilter(String initialInput) |
NativeToAsciiFilter(StringBuffer buf) |
| Modifier and Type | Method and Description |
|---|---|
String |
getResult() |
NativeToAsciiFilter |
write(char[] buf) |
NativeToAsciiFilter |
write(char[] buf,
int off,
int len) |
NativeToAsciiFilter |
write(String str) |
NativeToAsciiFilter |
write(String str,
int off,
int len)
Writes a portion of a string.
|
final String lineBreak
final StringBuffer out
public NativeToAsciiFilter()
public NativeToAsciiFilter(String initialInput)
public NativeToAsciiFilter(StringBuffer buf)
public NativeToAsciiFilter write(char[] buf)
public NativeToAsciiFilter write(String str)
public NativeToAsciiFilter write(char[] buf, int off, int len)
public NativeToAsciiFilter write(String str, int off, int len) throws IOException
str - String to be writtenoff - Offset from which to start reading characterslen - Number of characters to be writtenIOException - If an I/O error occurspublic String getResult()
Copyright © 2011-2014 David R. Smith. All Rights Reserved.