public void writeDataTo(OutputStream output) throws IOException {
    if (size == -1) throw new IOException("no data");

    InputStream stream = getInputStream();
    FileUtil.copy(stream, (int)size, output);
  }
public void writeDataTo(OutputStream output)