Java tutorial
import java.io.CharArrayWriter; public class Main { public static void main(String[] args) { CharArrayWriter chw = new CharArrayWriter(); // declare character sequence CharSequence csq = "tutorial from java2s.com"; // append character sequence to the writer chw.append(csq, 2, 5); // prints out the character sequences System.out.println(chw.toString()); } }