while (buffer.hasRemaining()) { System.out.print (buffer.get()); } System.out.println ("");
if (index >= strings.length) { return (false); } String string = strings [index++]; for (int i = 0; i < string.length(); i++) { buffer.put (string.charAt (i)); } return (true);
CharBuffer buffer = CharBuffer.allocate (100); while (fillBuffer (buffer)) { buffer.flip(); drainBuffer (buffer); buffer.clear(); }