FileDocCategorySizeDatePackage
ContLineReader.javaAPI DocExample2133Mon Sep 13 16:49:34 BST 1999None

ContLineReader

public abstract class ContLineReader extends LineNumberReader
Subclass of LineNumberReader 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, ian@darwinsys.com
version
$Id: ContLineReader.java,v 1.1 1999/09/13 19:49:35 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 booleanisContinuation()
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;