Package com.mxgraph.util.svg
Class StringNormalizingReader
java.lang.Object
java.io.Reader
com.mxgraph.util.svg.NormalizingReader
com.mxgraph.util.svg.StringNormalizingReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
This class represents a NormalizingReader which handles Strings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The current column in the stream.protected int
The length of the string.protected int
The current line in the stream.protected int
The index of the next character.protected String
The characters. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.mxgraph.util.svg.NormalizingReader
read
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, 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:
read
in classReader
- Throws:
IOException
-
getLine
public int getLine()Returns the current line in the stream.- Specified by:
getLine
in classNormalizingReader
-
getColumn
public int getColumn()Returns the current column in the stream.- Specified by:
getColumn
in classNormalizingReader
-
close
Close the stream.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-