nl_tokens: Creates <code > char< / code > subarray from buffered content .
pl_tokens: public char [ ] toArray ( int start , int len ) { int remaining = len ; int pos = 0 ; char [ ] array = new char [ len ] ; if ( len == 0 ) { return array ; } int i = 0 ; while ( start >= buffers [ i ] . length ) { start -= buffers [ i ] . length ; i ++ ; } while ( i < buffersCount ) { char [ ] buf = buffers [ i ] ; int c = Math . <mask> ( buf . length - start , remaining ) ; System . arraycopy ( buf , start , array , pos , c ) ; pos += c ; remaining -= c ; if ( remaining == 0 ) { break ; } start = 0 ; i ++ ; } return array ; }