private long readAll(InputStream is) throws IOException {
  long count=0;
  int n=0;
  byte[] buffer=new byte[1024 * 4];
  while (EOF != (n=is.read(buffer))) {
    count+=n;
  }
  return count;
}

private long readAll ( InputStream is ) throws IOException { long count = 0 ; int n = 0 ; byte [ ] buffer = new byte [ 1024 * 4 ] ; while ( EOF != ( n = is . read ( buffer ) ) ) { count += n ; } return count ; }
read all the bytes of a file without output .
