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

Variable Index

 o entities

Constructor Index

 o EntityManager(Tokenizer)

Method Index

 o defTextEntity(String, String)
 o entityDecode(CharBuffer)
Finds entitiy and character references in the provided char array and decodes them.
 o indexOf(char[], int, int, int)
Returns the index within this String of the first occurrence of the specified character, starting the search at fromIndex.
 o writeEntityDef(char[], int, int, Writer)

Variables

 o entities
 protected Hashtable entities

Constructors

 o EntityManager
 public EntityManager(Tokenizer tok)

Methods

 o 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.

 o writeEntityDef
 public void writeEntityDef(char buf[],
                            int off,
                            int len,
                            Writer out) throws Exception, IOException, NumberFormatException
 o defTextEntity
 public String defTextEntity(String entity,
                             String value)
 o 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