Class StringNormalizingReader
java.lang.Object
java.io.Reader
org.apache.batik.util.io.NormalizingReader
org.apache.batik.util.io.StringNormalizingReader
- All Implemented Interfaces:
Closeable, AutoCloseable, Readable
This class represents a NormalizingReader which handles Strings.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe current column in the stream.protected intThe length of the string.protected intThe current line in the stream.protected intThe index of the next character.protected StringThe characters. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class NormalizingReader
readMethods inherited from class Reader
mark, markSupported, nullReader, of, read, read, readAllAsString, readAllLines, ready, reset, skip, transferTo
-
Field Details
-
string
The characters. -
length
protected int lengthThe length of the string. -
next
protected int nextThe index of the next character. -
line
protected int lineThe current line in the stream. -
column
protected int columnThe current column in the stream.
-
-
Constructor Details
-
StringNormalizingReader
Creates a new StringNormalizingReader.- Parameters:
s- The string to read.
-
-
Method Details
-
read
Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.- Overrides:
readin classReader- Throws:
IOException
-
getLine
public int getLine()Returns the current line in the stream.- Specified by:
getLinein classNormalizingReader
-
getColumn
public int getColumn()Returns the current column in the stream.- Specified by:
getColumnin classNormalizingReader
-
close
Close the stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-