code: public int write(byte[] data, int offset, int count) throws IOException {
      int result = count;
      out.write(data,offset,count);
      size += count;
      return result;
    }
docs: Write the given number of bytes from the byte array. Return number of
  bytes written.
  @param data array containing bytes to be written.
  @param offset start index of array to begin reading from.
  @param count number of bytes to write.
  @return number of bytes written.
  @throws IOException IOException upon a write error.