public static Text valueOf(char[] chars,int offset,int length){
  if ((offset < 0) || (length < 0) || ((offset + length) > chars.length))   throw new IndexOutOfBoundsException();
  if (length <= BLOCK_SIZE) {
    Text text=Text.newPrimitive(length);
    System.arraycopy(chars,offset,text._data,0,length);
    return text;
  }
 else {
    int half=((length + BLOCK_SIZE) >> 1) & BLOCK_MASK;
    return Text.newComposite(Text.valueOf(chars,offset,half),Text.valueOf(chars,offset + half,length - half));
  }
}

public static Text valueOf ( char [ ] chars , int offset , int length ) { if ( ( offset < 0 ) || ( length < 0 ) || ( ( offset + length ) > chars . length ) ) throw new IndexOutOfBoundsException ( ) ; if ( length <= BLOCK_SIZE ) { Text text = Text . newPrimitive ( length ) ; System . arraycopy ( chars , offset , text . _data , 0 , length ) ; return text ; } else { int half = ( ( length + BLOCK_SIZE ) > > 1 ) & BLOCK_MASK ; return Text . newComposite ( Text . valueOf ( chars , offset , half ) , Text . valueOf ( chars , offset + half , length - half ) ) ; } }
returns the text that contains the characters from the specified subarray of characters .
