Debian Codegraph @

freehep-graphicsio-swf/src/main/java/org/freehep/graphicsio/swf/StartSound.java

raw symbols SCIP
1 // Copyright 2001, FreeHEP.
2 package org.freehep.graphicsio.swf;
3
4 import java.io.IOException;
5
6 /**
7 * StartSound TAG.
8 *
9 * @author Mark Donszelmann
10 * @author Charles Loomis
11 * @version $Id: freehep-graphicsio-swf/src/main/java/org/freehep/graphicsio/swf/StartSound.java db861da05344 2005/12/05 00:59:43 duns $
12 */
13 public class StartSound extends ControlTag {
14
15 private int character;
16
17 private SoundInfo info;
18
19 public StartSound(int id, SoundInfo info) {
20 this();
21 character = id;
22 this.info = info;
23 }
24
25 public StartSound() {
26 super(15, 1);
27 }
28
29 public SWFTag read(int tagID, SWFInputStream swf, int len)
30 throws IOException {
31
32 StartSound tag = new StartSound();
33 tag.character = swf.readUnsignedShort();
34 tag.info = new SoundInfo(swf);
35 return tag;
36 }
37
38 public void write(int tagID, SWFOutputStream swf) throws IOException {
39 swf.writeUnsignedShort(character);
40 info.write(swf);
41 }
42
43 public String toString() {
44 return super.toString() + "\n" + " character: " + character + "\n"
45 + " soundinfo: " + info;
46 }
47 }