|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xml.resolver.readers.TextCatalogReader
public class TextCatalogReader
Parses plain text Catalog files.
This class reads plain text Open Catalog files.
Catalog
Field Summary | |
---|---|
protected boolean |
caseSensitive
Are keywords in the catalog case sensitive? |
protected InputStream |
catfile
The input stream used to read the catalog |
protected int[] |
stack
Character lookahead stack. |
protected Stack |
tokenStack
Token stack. |
protected int |
top
The current position on the lookahead stack |
Constructor Summary | |
---|---|
TextCatalogReader()
Construct a CatalogReader object. |
Method Summary | |
---|---|
protected void |
finalize()
The destructor. |
boolean |
getCaseSensitive()
|
protected int |
nextChar()
Return the next logical character from the input stream. |
protected String |
nextToken()
Return the next token in the catalog file. |
void |
readCatalog(Catalog catalog,
InputStream is)
Read a catalog from an input stream |
void |
readCatalog(Catalog catalog,
String fileUrl)
Start parsing a text catalog file. |
void |
setCaseSensitive(boolean isCaseSensitive)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected InputStream catfile
protected int[] stack
protected Stack tokenStack
protected int top
protected boolean caseSensitive
Constructor Detail |
---|
public TextCatalogReader()
Construct a CatalogReader object.
Method Detail |
---|
public void setCaseSensitive(boolean isCaseSensitive)
public boolean getCaseSensitive()
public void readCatalog(Catalog catalog, String fileUrl) throws MalformedURLException, IOException
Start parsing a text catalog file. The file is
actually read and parsed
as needed by nextEntry
.
readCatalog
in interface CatalogReader
fileUrl
- The URL or filename of the catalog file to processcatalog
- The catalog for which this reader is called.
MalformedURLException
- Improper fileUrl
IOException
- Error reading catalog filepublic void readCatalog(Catalog catalog, InputStream is) throws MalformedURLException, IOException
CatalogReader
Read a catalog from an input stream
This class reads a catalog from an input stream.
readCatalog
in interface CatalogReader
catalog
- The catalog for which this reader is called.is
- The input stream that is to be read.
IOException
- if the URL cannot be read.
MalformedURLException
protected void finalize()
The destructor.
Makes sure the catalog file is closed.
finalize
in class Object
protected String nextToken() throws IOException
Return the next token in the catalog file.
IOException
- If an error occurs reading from the stream.protected int nextChar() throws IOException
Return the next logical character from the input stream.
IOException
- If an error occurs reading from the stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |