Throw IOException as the other tags do.

This commit is contained in:
Paolo Cancedda
2011-07-30 19:54:21 +02:00
parent 8e8736aed7
commit 27f013b6bc
2 changed files with 15 additions and 25 deletions
+6 -11
View File
@@ -66,18 +66,13 @@ public class DoABCTag extends Tag {
* @param version SWF version
* @throws IOException
*/
public DoABCTag(byte[] data, int version) {
public DoABCTag(byte[] data, int version) throws IOException {
super(82, data);
try {
InputStream is = new ByteArrayInputStream(data);
SWFInputStream sis = new SWFInputStream(is, version);
flags = sis.readUI32();
name = sis.readString();
abc = new ABC(is);
} catch (IOException e) {
}
InputStream is = new ByteArrayInputStream(data);
SWFInputStream sis = new SWFInputStream(is, version);
flags = sis.readUI32();
name = sis.readString();
abc = new ABC(is);
}
/**
@@ -17,16 +17,16 @@
package com.jpexs.asdec.tags;
import com.jpexs.asdec.SWFInputStream;
import com.jpexs.asdec.SWFOutputStream;
import com.jpexs.asdec.action.Action;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.jpexs.asdec.SWFInputStream;
import com.jpexs.asdec.SWFOutputStream;
import com.jpexs.asdec.action.Action;
public class DoInitActionTag extends Tag implements ASMSource {
/**
* Identifier of Sprite
@@ -50,17 +50,12 @@ public class DoInitActionTag extends Tag implements ASMSource {
* @param version SWF version
* @throws IOException
*/
public DoInitActionTag(byte[] data, int version) {
public DoInitActionTag(byte[] data, int version) throws IOException {
super(59, data);
try {
ByteArrayInputStream bais = new ByteArrayInputStream(data);
SWFInputStream sis = new SWFInputStream(bais, version);
spriteId = sis.readUI16();
//actions = sis.readActionList();
actionBytes=sis.readBytes(sis.available());
} catch (IOException e) {
}
SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version);
spriteId = sis.readUI16();
//actions = sis.readActionList();
actionBytes=sis.readBytes(sis.available());
}
/**