code: private void readFully(InputStream in, byte[] bytes) throws IOException {
          int read = ByteStreams.read(in, bytes, 0, bytes.length);
          if (read == 0) {
              throw new NoBytesReadException();
          } else if (read != bytes.length) {
              throw new EOFException("reached end of stream after reading "
                      + read + " bytes; " + bytes.length + " bytes expected");
          }
      }
docs: This is a copy of ByteStreams.readFully(), with the slight change that it throws
  NoBytesReadException if zero bytes are read. Otherwise it is identical.
  
  @param in
  @param bytes
  @throws IOException