Code example for CharBuffer

Methods: put, remaining

0
	 */ 
	@Override 
	public int read(CharBuffer target) throws IOException {
		if (remaining <= 0) return -1;
		 
		int len = target.remaining();
		if (len > remaining)
			len = (int) remaining;
		 
		char[] cbuf = new char[len];
		int n = read(cbuf, 0, len);
		if (n > 0)
			target.put(cbuf, 0, n);
		return n;
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	@Override 
	public int read(char[] cbuf) throws IOException {