Class TextEncoder
- java.lang.Object
-
- com.opensymphony.module.sitemesh.filter.TextEncoder
-
public class TextEncoder extends Object
Converts text stored in byte[] to char[] using specified encoding.- Version:
- $Revision: 1.1 $
- Author:
- Scott Farquhar, Hani Suleiman, Joe Walnes
-
-
Field Summary
Fields Modifier and Type Field Description private static String
DEFAULT_ENCODING
private static boolean
JDK14
-
Constructor Summary
Constructors Constructor Description TextEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char[]
encode(byte[] data, String encoding)
private char[]
get13Buffer(byte[] data, String encoding)
private char[]
get14Buffer(byte[] data, String encoding)
private char[]
trim(char[] ca, int len)
-
-
-
Field Detail
-
DEFAULT_ENCODING
private static final String DEFAULT_ENCODING
-
JDK14
private static final boolean JDK14
-
-
Method Detail
-
encode
public char[] encode(byte[] data, String encoding) throws IOException
- Throws:
IOException
-
get13Buffer
private char[] get13Buffer(byte[] data, String encoding) throws IOException
- Throws:
IOException
-
get14Buffer
private char[] get14Buffer(byte[] data, String encoding) throws IOException
- Throws:
IOException
-
trim
private char[] trim(char[] ca, int len)
-
-