| 1 |
|
| 2 |
package org.freehep.graphicsio.swf; |
| 3 |
|
| 4 |
import java.io.IOException; |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 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 |
} |