Code example for CharBuffer

Methods: get

0
        return this.content.limit();
    } 
 
    public char charAt(int index)
    { 
        return this.content.get(index);
    } 
 
    public CharSequence subSequence(int start, int end) {
        return new CharSubSequence(this, start, end);
    } 
     
    public String toString() {
        StringBuffer sb = new StringBuffer(length());
        // could use StringBuffer.append(CharSequence) if willing to do 1.5 & up 
        for (int i = 0;i<length();i++) {
            sb.append(charAt(i)); 
        } 
        return sb.toString();
    } 
}