Package org.apache.batik.util.io
Class NormalizingReader
- java.lang.Object
-
- java.io.Reader
-
- org.apache.batik.util.io.NormalizingReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
- Direct Known Subclasses:
StreamNormalizingReader,StringNormalizingReader
public abstract class NormalizingReader extends java.io.ReaderThis class represents a reader which normalizes the line break: \n, \r, \r\n are replaced by \n. The methods of this reader are not synchronized. The input is buffered.- Version:
- $Id: NormalizingReader.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Constructor Summary
Constructors Constructor Description NormalizingReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intgetColumn()Returns the current column in the stream.abstract intgetLine()Returns the current line in the stream.intread(char[] cbuf, int off, int len)Read characters into a portion of an array.
-
-
-
Method Detail
-
read
public int read(char[] cbuf, int off, int len) throws java.io.IOExceptionRead characters into a portion of an array.- Specified by:
readin classjava.io.Reader- Parameters:
cbuf- Destination bufferoff- Offset at which to start writing characterslen- Maximum number of characters to read- Returns:
- The number of characters read, or -1 if the end of the stream has been reached
- Throws:
java.io.IOException
-
getLine
public abstract int getLine()
Returns the current line in the stream.
-
getColumn
public abstract int getColumn()
Returns the current column in the stream.
-
-