Package org.apache.batik.util.io
Class StringNormalizingReader
- java.lang.Object
-
- java.io.Reader
-
- org.apache.batik.util.io.NormalizingReader
-
- org.apache.batik.util.io.StringNormalizingReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
public class StringNormalizingReader extends NormalizingReader
This class represents a NormalizingReader which handles Strings.- Version:
- $Id: StringNormalizingReader.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected intcolumnThe current column in the stream.protected intlengthThe length of the string.protected intlineThe current line in the stream.protected intnextThe index of the next character.protected java.lang.StringstringThe characters.
-
Constructor Summary
Constructors Constructor Description StringNormalizingReader(java.lang.String s)Creates a new StringNormalizingReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the stream.intgetColumn()Returns the current column in the stream.intgetLine()Returns the current line in the stream.intread()Read a single character.-
Methods inherited from class org.apache.batik.util.io.NormalizingReader
read
-
-
-
-
Method Detail
-
read
public int read() throws java.io.IOExceptionRead 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 classjava.io.Reader- Throws:
java.io.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
public void close() throws java.io.IOExceptionClose the stream.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Reader- Throws:
java.io.IOException
-
-