List of usage examples for java.nio CharBuffer append
public CharBuffer append(CharSequence csq, int start, int end)
From source file:Main.java
public static void main(String[] args) { CharBuffer cb1 = CharBuffer.allocate(5); cb1.append("java2s.com", 0, 4); cb1.rewind();//from w w w . j ava2 s. c o m System.out.println(Arrays.toString(cb1.array())); }