FileDocCategorySizeDatePackage
ContLineReader.javaAPI DocExample2171Sun Mar 07 11:27:04 GMT 2004None

ContLineReader

public abstract class ContLineReader extends LineNumberReader
Subclass of LineNumberReader, parent of others, to allow reading of continued lines using the readLine() method. The other Reader methods (readInt()) etc.) must not be used. Must subclass to provide the actual implementation of readLine().
author
Ian Darwin, http://www.darwinsys.com/
version
$Id: ContLineReader.java,v 1.4 2004/03/07 17:27:04 ian Exp $

Fields Summary
protected int
firstLineNumber
Line number of first line in current (possibly continued) line
protected boolean
doContinue
True if handling continuations, false if not; false == "PRE" mode
Constructors Summary
public ContLineReader(Reader in)
Construct a ContLineReader with the default input-buffer size.

		super(in);
	
public ContLineReader(Reader in, int sz)
Construct a ContLineReader using the given input-buffer size.

		super(in, sz);
	
Methods Summary
public booleangetContinuationMode()
Get the continuation mode

		return doContinue;
	
public booleanmarkSupported()

		return false;
	
public intread()
Read a single character, returned as an int.

		return super.read();
	
public intread(char[] cbuf, int off, int len)
Read characters into a portion of an array.

		return super.read(cbuf, off, len);
	
public abstract java.lang.StringreadLine()
Read one (possibly continued) line, stripping out the \ that marks the end of each line but the last in a sequence.

public java.lang.StringreadPhysicalLine()
Read one real line. Provided as a convenience for the subclasses, so they don't embarass themselves trying to call "super.readLine()" which isn't very practical...

		return super.readLine();
	
public voidsetContinuationMode(boolean b)
Set the continuation mode


	     
	    
		doContinue = b;