private void buffer ( ) throws IOException { int remaining = buffer . length ; while ( remaining > 0 ) { int r = input . read ( buffer , buffer . length - remaining , remaining ) ; if ( r <= 0 ) { // Not enough information to fill the buffer offset = 0 ; maxOffset = buffer . length - remaining ; return ; } remaining -= r ; } maxOffset = buffer . length ; offset = 0 ; }
Fills the buffer .