org.enhydra.xml.xmlc.misc
Class LineNumberMapReader
java.lang.Object
|
+--java.io.Reader
|
+--org.enhydra.xml.xmlc.misc.LineNumberMapReader
- public final class LineNumberMapReader
- extends Reader
A file reader that keeps a map of chararacter offsets to line numbers. This
is used by the Swing HTML parser interface to provide reasonable error
messages.
Method Summary |
void |
close()
Close the stream. |
LineNumberMap |
getLineNumberMap()
Get the line number map. |
int |
read()
Read a character. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LineNumberMapReader
public LineNumberMapReader(InputSource inputSource)
throws IOException
- Construct a new reader for the specified file.
getLineNumberMap
public final LineNumberMap getLineNumberMap()
- Get the line number map.
read
public int read()
throws IOException
- Read a character.
- Overrides:
read
in class Reader
- Throws:
IOException
- If an I/O error occurs- See Also:
Reader.read()
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Read characters into a portion of an array.
- Overrides:
read
in class Reader
- Throws:
IOException
- If an I/O error occurs- See Also:
Reader.read()
close
public void close()
throws IOException
- Close the stream.
- Overrides:
close
in class Reader
- Throws:
IOException
- If an I/O error occurs- See Also:
Reader.close()
Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.