CharBuffer cb = CharBuffer.allocate (15); cb.put ("Hello World"); println (cb); cb.flip(); println (cb); cb.flip(); println (cb); cb.flip(); println (cb);
System.out.println ("pos=" + cb.position() + ", limit=" + cb.limit() + ": '" + cb + "'");