public void ensure( int i ) { if ( i + location > capacity ) { buffer = Chr.grow( buffer, i * 2 ); capacity = buffer.length; } }
public void ensure( int i ) { if ( i + location > capacity ) { buffer = Chr.grow( buffer, i * 2 ); capacity = buffer.length; } }
public final CharBuf addChar( final char ch ) { if ( 1 + location > capacity ) { buffer = Chr.grow( buffer ); capacity = buffer.length; } buffer [location] = ch; location ++; return this; }
public final CharBuf addChar( final char ch ) { if ( 1 + location > capacity ) { buffer = Chr.grow( buffer ); capacity = buffer.length; } buffer [location] = ch; location ++; return this; }
public final CharBuf add( char ch ) { if ( 1 + location > capacity ) { buffer = Chr.grow( buffer ); capacity = buffer.length; } buffer [location] = ch; location ++; return this; }
public final CharBuf add( char ch ) { if ( 1 + location > capacity ) { buffer = Chr.grow( buffer ); capacity = buffer.length; } buffer [location] = ch; location ++; return this; }
public final CharBuf addChars( char[] chars ) { if ( chars.length + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + chars.length ); capacity = buffer.length; } System.arraycopy ( chars, 0, buffer, location, chars.length ); location += chars.length; return this; }
public final CharBuf addQuoted( char[] chars ) { int sizeNeeded = chars.length + 2 + location; if ( sizeNeeded > capacity ) { buffer = Chr.grow( buffer, sizeNeeded * 2 ); capacity = buffer.length; } buffer [location] = '"'; location++; System.arraycopy( chars, 0, buffer, location, chars.length ); location += (chars.length); buffer [location] = '"'; location++; return this; }
public final CharBuf addChars( char[] chars ) { if ( chars.length + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + chars.length ); capacity = buffer.length; } System.arraycopy ( chars, 0, buffer, location, chars.length ); location += chars.length; return this; }
public final CharBuf addQuoted( char[] chars ) { int sizeNeeded = chars.length + 2 + location; if ( sizeNeeded > capacity ) { buffer = Chr.grow( buffer, sizeNeeded * 2 ); capacity = buffer.length; } buffer [location] = '"'; location++; System.arraycopy( chars, 0, buffer, location, chars.length ); location += (chars.length); buffer [location] = '"'; location++; return this; }
public CharBuf add( String string, int start, int end ) { int charsLength = end - start ; if ( charsLength + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + charsLength ); } return this.add(string.substring(start, end)); }
public CharBuf add( char[] chars ) { if ( chars.length + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + chars.length ); capacity = buffer.length; } Chr._idx( buffer, location, chars ); location += chars.length; return this; }
public CharBuf add( byte[] bytes, int start, int end ) { int charsLength = end - start ; if ( charsLength + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + charsLength ); } Chr._idx( buffer, location, bytes, start, end ); capacity = buffer.length; location += charsLength; return this; }
public CharBuf add( String string, int start, int end ) { int charsLength = end - start ; if ( charsLength + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + charsLength ); } return this.add(string.substring(start, end)); }
public CharBuf add( char[] chars ) { if ( chars.length + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + chars.length ); capacity = buffer.length; } Chr._idx( buffer, location, chars ); location += chars.length; return this; }
public CharBuf add( byte[] bytes, int start, int end ) { int charsLength = end - start ; if ( charsLength + location > capacity ) { buffer = Chr.grow( buffer, buffer.length * 2 + charsLength ); } Chr._idx( buffer, location, bytes, start, end ); capacity = buffer.length; location += charsLength; return this; }
public CharBuf add( byte[] chars ) { if ( chars.length + location < capacity ) { Chr._idx( buffer, location, chars ); } else { buffer = Chr.grow( buffer, buffer.length * 2 + chars.length ); Chr._idx( buffer, location, chars ); capacity = buffer.length; } location += chars.length; return this; }
public CharBuf add( char[] chars, final int length ) { if ( length + location < capacity ) { Chr._idx( buffer, location, chars, length ); } else { buffer = Chr.grow( buffer, buffer.length * 2 + length ); Chr._idx( buffer, location, chars ); capacity = buffer.length; } location += length; return this; }
public CharBuf add( byte[] chars ) { if ( chars.length + location < capacity ) { Chr._idx( buffer, location, chars ); } else { buffer = Chr.grow( buffer, buffer.length * 2 + chars.length ); Chr._idx( buffer, location, chars ); capacity = buffer.length; } location += chars.length; return this; }
public CharBuf add( char[] chars, final int length ) { if ( length + location < capacity ) { Chr._idx( buffer, location, chars, length ); } else { buffer = Chr.grow( buffer, buffer.length * 2 + length ); Chr._idx( buffer, location, chars ); capacity = buffer.length; } location += length; return this; }