Code example for CharBuffer

Methods: put, remaining

0
 
		return read;
	} 
 
	public int read(CharBuffer charBuffer) throws IOException {
		int remaining = charBuffer.remaining();
 
		char[] charArray = new char[remaining];
 
		int read = read(charArray, 0, remaining);
 
		if (read > 0) {
			charBuffer.put(charArray, 0, read);
		} 
 
		return read;
	} 
 
	public boolean ready() throws IOException { 
		if (string == null) {
			throw new IOException("String is null");