BufferedReader markSupported - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for BufferedReader markSupported method.

This code example shows how to use the following methods:markSupported
		br.mark(readAheadLimit);
	} 
 
	@Override 
	public boolean markSupported() { 
		return br.markSupported();
	} 
 
	@Override 
	public int read(CharBuffer target) throws IOException {
		return br.read(target.array());
	} 
 
	@Override 
	public int read(char[] cbuf) throws IOException {
		return br.read(cbuf);
	} 
 
	@Override 
	public void reset() throws IOException {
5
CodeRank
This code example shows how to use the following methods:markSupported
	/** 
	 * @tests java.io.BufferedReader#markSupported() 
	 */ 
	public void test_markSupported() { 
		// Test for method boolean java.io.BufferedReader.markSupported() 
		br = new BufferedReader(new Support_StringReader(testString));
		assertTrue("markSupported returned false", br.markSupported());
	} 
 
	/** 
	 * @tests java.io.BufferedReader#read() 
	 */ 
	public void test_read() throws IOException { 
		// Test for method int java.io.BufferedReader.read() 
		try { 
			br = new BufferedReader(new Support_StringReader(testString));
			int r = br.read();
			assertTrue("Char read improperly", testString.charAt(0) == r);
			br = new BufferedReader(new Support_StringReader(new String(
					new char[] { '\u8765' }))); 
5
CodeRank
markSupported Method Overview
Tells whether this stream supports the mark() operation, which it does.
See Code Examples for other Java 8 BufferedReader Methods: