public void Write(File f) throws IOException {
   MC68000OutputStream out =
       new MC68000OutputStream(new BufferedOutputStream(new FileOutputStream(f)));
   try {
     write(out);
   } finally {
     out.close();
   }
 }
 public void write(MC68000OutputStream out) throws IOException {
   out.writeULONG(id);
   long length = getLength();
   out.writeULONG(length);
   if (data == null) {
     out.writeULONG(type);
     for (MutableIFFChunk child : childChunks()) {
       child.write(out);
     }
   } else {
     out.write(data);
   }
   if (length % 2 == 1) {
     out.write((byte) 0);
   }
 }