Code example for PushbackReader

Methods: unread

0
	/** 
	 * @tests java.io.PushbackReader#unread(char[], int, int) 
	 */ 
	public void test_unread_$CII_NullPointerException() throws IOException { 
		//a pushback reader with one character buffer 
		pbr = new PushbackReader(new StringReader(pbString));
 
		try { 
			pbr.unread(null, 0, 1);
			fail("should throw NullPointerException");
		} catch (NullPointerException e) {
			// expected 
		} 
	} 
 
	/** 
	 * @tests java.io.PushbackReader#unread(char[], int, int) 
	 */ 
	public void test_unread_$CII_Exception_InsufficientBuffer() throws IOException { 
		//a pushback reader with one character buffer 
		pbr = new PushbackReader(new StringReader(pbString));