code: public static int read(InputStream input, byte[] buffer) throws IOException {
          return read(input, buffer, 0, buffer.length);
      }
docs: Read bytes from an input stream.
  This implementation guarantees that it will read as many bytes
  as possible before giving up; this may not always be the case for
  subclasses of {@link InputStream}.
  
  @param input  where to read input from
  @param buffer destination
  @return actual length read; may be less than requested if EOF was reached
  @throws IOException if a read error occurs
  @since 2.2