ewe.util
Class TextDecoder

java.lang.Object
  extended byewe.util.TextDecoder

public class TextDecoder
extends Object


Constructor Summary
TextDecoder(String str)
           
 
Method Summary
static String decode(char[] data, int start, int length)
           
 void deleteValue(String name)
           
 String encode()
          Re-encode the decoded text into a String.
 int getIndexOf(String name)
          Get the index of the named value.
 String getName(int index)
          The name of the value at the specified index.
 String getValue(int index)
          The value at the specified index.
 String getValue(String name)
          Get the value of the name.
static String getValueOf(SubString sub)
           
static boolean isNamed(SubString sub, String name)
           
 void setValue(String name, String value)
           
 int size()
           
 String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode
 

Constructor Detail

TextDecoder

public TextDecoder(String str)
Method Detail

decode

public static String decode(char[] data,
                            int start,
                            int length)

size

public int size()

getIndexOf

public int getIndexOf(String name)
Get the index of the named value.

Parameters:
name - The name of the value.
Returns:
The index of the value, or -1 if it is not present.

getValue

public String getValue(String name)
Get the value of the name.

Parameters:
name - The name of the value.
Returns:
The value or null if it is not set.

getName

public String getName(int index)
The name of the value at the specified index.

Parameters:
index -
Returns:
The name at the index.

getValue

public String getValue(int index)
The value at the specified index.

Parameters:
index -
Returns:
The value at the specified index.

isNamed

public static boolean isNamed(SubString sub,
                              String name)

getValueOf

public static String getValueOf(SubString sub)

toString

public String toString()
Description copied from class: Object
Return a String representation of this object.

Overrides:
toString in class Object
Returns:
a String representing this object.

setValue

public void setValue(String name,
                     String value)

deleteValue

public void deleteValue(String name)

encode

public String encode()
Re-encode the decoded text into a String.

Returns:
The encoded string.