Debian Codegraph @

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

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