Code example for PushbackReader

Methods: unread

0
	/** 
	 * @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));
 
		//if count > buffer's size , should throw IOException 
		try { 
			pbr.unread(new char[pbString.length()], 0, 2);
			fail("should throw IOException");
		} catch (IOException e) {
			// expected 
		} 
	} 
 
	/** 
	 * @tests java.io.PushbackReader#unread(char[], int, int) 
	 */ 
	public void test_unread_$CII_ArrayIndexOutOfBoundsException() throws IOException {