|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.xml.scanner.AbstractScanner
This class contains the basic methods needed by an XML scanners.
Field Summary | |
protected char[] |
buffer
The buffer used to store the value of the current lexical unit. |
static java.lang.String |
BUNDLE_CLASSNAME
The default resource bundle base name. |
protected InputBuffer |
inputBuffer
The input buffer. |
protected boolean |
lastFragment
Must be set to true when the current lexical unit is the last string fragment of an attribute value or an entity value. |
protected LocalizableSupport |
localizableSupport
The localizable support. |
protected int |
type
The type of the current lexical unit. |
protected char[] |
value
The value of the current lexical unit. |
Constructor Summary | |
protected |
AbstractScanner(java.io.Reader r)
Creates a new AbstractScanner object. |
Method Summary | |
protected LexicalException |
createException(java.lang.String message)
Returns a LexicalException initialized with the given message. |
int |
currentType()
The current lexical unit type like defined in LexicalUnits. |
java.lang.String |
formatMessage(java.lang.String key,
java.lang.Object[] args)
Implements Localizable.formatMessage(String,Object[]) . |
InputBuffer |
getInputBuffer()
Returns the input buffer. |
java.util.Locale |
getLocale()
Implements Localizable.getLocale() . |
protected int |
readComment()
Reads a comment. |
protected int |
readIdentifier(java.lang.String s,
int type,
int ntype)
Reads the given identifier. |
protected int |
readName(int type)
Reads a name. |
protected int |
readNmtoken()
Reads a Nmtoken. |
protected int |
readPEReference()
Reads a parameter entity reference. |
protected int |
readPIStart()
Reads a processing instruction start. |
protected int |
readReference()
Reads an entity or character reference. |
protected int |
readString()
Reads a simple string, like the ones used for version, encoding, public/system identifiers... |
void |
setLocale(java.util.Locale l)
Implements Localizable.setLocale(Locale) . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String BUNDLE_CLASSNAME
protected LocalizableSupport localizableSupport
protected InputBuffer inputBuffer
protected char[] buffer
protected char[] value
protected int type
protected boolean lastFragment
Constructor Detail |
protected AbstractScanner(java.io.Reader r) throws LexicalException
r
- The reader to scan.Method Detail |
public void setLocale(java.util.Locale l)
Localizable.setLocale(Locale)
.setLocale
in interface Localizable
org.apache.batik.i18n.Localizable
l
- The locale to set.public java.util.Locale getLocale()
Localizable.getLocale()
.getLocale
in interface Localizable
public java.lang.String formatMessage(java.lang.String key, java.lang.Object[] args) throws java.util.MissingResourceException
Localizable.formatMessage(String,Object[])
.formatMessage
in interface Localizable
org.apache.batik.i18n.Localizable
key
- The key used to retreive the message from the resource
bundle.args
- The objects that compose the message.java.util.MissingResourceException
- if the key is not in the bundle.public InputBuffer getInputBuffer()
public int currentType()
protected int readIdentifier(java.lang.String s, int type, int ntype) throws java.io.IOException, LexicalException
s
- The portion of the identifier to read.type
- The lexical unit type of the identifier.ntype
- The lexical unit type to set if the identifier do not
match or -1 if an error must be signaled.protected int readName(int type) throws java.io.IOException, LexicalException
type
- The lexical unit type to set.protected int readNmtoken() throws java.io.IOException, LexicalException
protected int readComment() throws java.io.IOException, LexicalException
protected int readString() throws java.io.IOException, LexicalException
protected int readReference() throws java.io.IOException, LexicalException
protected int readPEReference() throws java.io.IOException, LexicalException
protected int readPIStart() throws java.io.IOException, LexicalException
protected LexicalException createException(java.lang.String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |