All Packages Class Hierarchy This Package Previous Next Index
Class hplb.xml.EntityManager
java.lang.Object
|
+----hplb.xml.EntityManager
- public class EntityManager
- extends Object
A very simple entity manager.
- Author:
- Anders Kristensen
-
entities
-
-
EntityManager(Tokenizer)
-
-
defTextEntity(String, String)
-
-
entityDecode(CharBuffer)
- Finds entitiy and character references in the provided char array
and decodes them.
-
indexOf(char[], int, int, int)
- Returns the index within this String of the first occurrence of the
specified character, starting the search at fromIndex.
-
writeEntityDef(char[], int, int, Writer)
-
entities
protected Hashtable entities
EntityManager
public EntityManager(Tokenizer tok)
entityDecode
public final CharBuffer entityDecode(CharBuffer buffer) throws Exception
- Finds entitiy and character references in the provided char array
and decodes them. The operation is destructive, i.e. the encoded
string replaces the original - this is atrightforward since the
new string can only get shorter.
writeEntityDef
public void writeEntityDef(char buf[],
int off,
int len,
Writer out) throws Exception, IOException, NumberFormatException
defTextEntity
public String defTextEntity(String entity,
String value)
indexOf
public static final int indexOf(char buf[],
int ch,
int from,
int to)
- Returns the index within this String of the first occurrence of the
specified character, starting the search at fromIndex. This method
returns -1 if the character is not found.
- Parameters:
- s - buf the buffer to search
- s - ch the character to search for
- s - from the index to start the search from
- s - to the highest possible index returned plus 1
All Packages Class Hierarchy This Package Previous Next Index