code: public void writeTo(final OutputStream sink) throws IOException {
          final InputStream in = getInputStream();
          try {
              ByteStreams.copy(in, sink);
          } finally {
              in.close();
          }
      }
docs: Writes all the binary data of this representation to the {@code OutputStream} sink
  specified. Conversion from character to byte data, if required, is performed according to
  the charset specified by the MIME type metadata property ({@link NIE#MIME_TYPE}). If some
  data has been already read via {@code getInputStream()} or {@code getReaer()}, it will not
  be written to the supplied sink.
  
  @param sink
  the sink where to write binary data to
  @throws IOException
  in case access to binary data fails