com.opensymphony.module.sitemesh.filter
Class TextEncoder

java.lang.Object
  extended by 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
private static String DEFAULT_ENCODING
           
private static boolean JDK14
           
 
Constructor Summary
TextEncoder()
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING

private static final String DEFAULT_ENCODING

JDK14

private static final boolean JDK14
Constructor Detail

TextEncoder

public TextEncoder()
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)

www.opensymphony.com/sitemesh/