See the java doc for CharBuffer. put() doesn't take any byte[] parameter.