View Javadoc

1   // Copyright 2001, FreeHEP.
2   package org.freehep.graphicsio.swf;
3   
4   import java.io.IOException;
5   
6   /**
7    * RemoveObject2 TAG.
8    * 
9    * @author Mark Donszelmann
10   * @author Charles Loomis
11   * @version $Id: RemoveObject2.java 8584 2006-08-10 23:06:37Z duns $
12   */
13  public class RemoveObject2 extends ControlTag {
14  
15      private int depth;
16  
17      public RemoveObject2(int depth) {
18          this();
19          this.depth = depth;
20      }
21  
22      public RemoveObject2() {
23          super(28, 3);
24      }
25  
26      public SWFTag read(int tagID, SWFInputStream swf, int len)
27              throws IOException {
28          RemoveObject2 tag = new RemoveObject2();
29          tag.depth = swf.readUnsignedShort();
30          return tag;
31      }
32  
33      public void write(int tagID, SWFOutputStream swf) throws IOException {
34          swf.writeUnsignedShort(depth);
35      }
36  
37      public String toString() {
38          return super.toString() + "\n" + "  depth: " + depth;
39      }
40  }