Code example for StreamTokenizer

Methods: eolIsSignificant

0
		this(new FileReader(fileName));
	} 
 
	/** Construct a file scanner by existing Reader */ 
	public ScanStreamTok(Reader rdr) throws IOException {
		tf = new StreamTokenizer(rdr);
		tf.eolIsSignificant(true);
	} 
 
	protected void process() throws IOException { 
		int i;
 
		while ((i = tf.nextToken()) != StreamTokenizer.TT_EOF) {
			switch(i) {
			case StreamTokenizer.TT_EOF:
				System.out.println("End of file");
				break; 
			case StreamTokenizer.TT_EOL:
				System.out.println("End of line");
				break; 
			case StreamTokenizer.TT_NUMBER: