Package com.opensymphony.module.sitemesh.filter

# 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 final String`
`DEFAULT_ENCODING`
`private static final boolean`
`JDK14`

## Constructor Summary

Constructors
Constructor
Description
`TextEncoder()`

## Method Summary

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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_ENCODING

private static final String DEFAULT_ENCODING

### JDK14

private static final boolean JDK14

## Constructor Details

### TextEncoder

public TextEncoder()

## Method Details

### 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)