Code example for StreamTokenizer

Methods: eolIsSignificant, nextToken, ordinaryChar

0
		assertTrue("Wrong token 1,3", s.nextToken() == '\n');
		assertTrue("Wrong token 1,4", s.nextToken() == '\n');
		pout.close();
		assertTrue("Wrong token 1,5",
			   s.nextToken() == StreamTokenizer.TT_EOF);
		StreamTokenizer tokenizer = new StreamTokenizer(
								new Support_StringReader("\n \r\n#")); 
		tokenizer.ordinaryChar('\n'); // make \n ordinary
		tokenizer.eolIsSignificant(true);
		assertTrue("Wrong token 2,1", tokenizer.nextToken() == '\n');
		assertTrue("Wrong token 2,2", tokenizer.nextToken() == '\n');
		assertEquals("Wrong token 2,3", '#', tokenizer.nextToken());
	} 
 
	/** 
	 * @tests java.io.StreamTokenizer#ordinaryChar(int) 
	 */ 
	public void test_ordinaryCharI() throws IOException { 
		// SM. 
		setTest("Ffjein 893"); 
		st.ordinaryChar('F');