コード例 #1
0
 public void Write(File f) throws IOException {
   MC68000OutputStream out =
       new MC68000OutputStream(new BufferedOutputStream(new FileOutputStream(f)));
   try {
     write(out);
   } finally {
     out.close();
   }
 }
コード例 #2
0
 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);
   }
 }