Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2015 Santhosh Kumar Tekuri The JLibs authors license this file to you under the Apache License, version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 package jlibs.nbp;
 import static java.lang.Character.*;

Santhosh Kumar T
 public final class Chars implements CharSequence{
     private char buff[] = new char[100];
     public int count;
     private int stack[] = new int[50];
     int free = 0;
     public boolean isBuffering(){
         return >0;
     public void push(){
              = Arrays.copyOf(.<<1);
         [++] = ;
     public void expandCapacity(int increment){
         int newCapacity = (.+increment)<<1;
             newCapacity = .;
          = Arrays.copyOf(newCapacity);
     public void append(char character){
         [++] = character;
     public void append(char chars[], int offsetint len){
          += len;
     public void append(int codePoint){
             [++] = (char)codePoint;
             int offset = codePoint - ;
             [++] = (char)((offset >>> 10) + );
             [++] = (char)((offset & 0x3ff) + );
     public Chars pop(int beginint end){
          = begin + [--];
          = -end;
              = 0;
         return this;
     public void clear(){
          =  = 0;
     /*-------------------------------------------------[ CharSequence ]---------------------------------------------------*/
     private int offsetlength;
     public char[] array(){
         return ;
     public int offset(){
         return ;
    public int length(){
        return ;
    public char charAt(int index){
        if(index<0 || index>=)
            throw new IndexOutOfBoundsException(index+" is not in range [0, "++")");
            return [+index];
    public CharSequence subSequence(int startint end){
            throw new IndexOutOfBoundsException("CharArray index out of range: "+start);
            throw new IndexOutOfBoundsException("CharArray index out of range: "+end);
            throw new IndexOutOfBoundsException("CharArray index out of range: "+(end-start));
        return (start==0 && end==) ? this : CharBuffer.wrap(this.+startend-start);
    public String toString(){
        return new String();
New to GrepCode? Check out our FAQ X