nl_tokens: Gets the current contents of this byte stream as a Input Stream . The returned stream is backed by buffers of <code > this< / code > stream avoiding memory allocation and copy thus saving space and time . <br >
pl_tokens: private InputStream toBufferedInputStream ( ) { int remaining = count ; if ( remaining == 0 ) { return new ClosedInputStream ( ) ; } List < ByteArrayInputStream > list = new ArrayList < ByteArrayInputStream > ( buffers . size ( ) ) ; for ( byte [ ] buf : buffers ) { int c = Math . <mask> ( buf . length , remaining ) ; list . add ( new ByteArrayInputStream ( buf , 0 , c ) ) ; remaining -= c ; if ( remaining == 0 ) { break ; } } return new SequenceInputStream ( Collections . enumeration ( list ) ) ; }