From a32835dd2fc2e330b2ab72df22fe09fae8291383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Mon, 2 Jan 2012 10:02:51 +0100 Subject: [PATCH] Keep track of tag position in SWF file. Added code to dump tag infos. (by Paolo Cancedda) --- trunk/src/com/jpexs/asdec/Main.java | 2 + trunk/src/com/jpexs/asdec/SWF.java | 9 +- trunk/src/com/jpexs/asdec/SWFInputStream.java | 299 ++++++++++++++---- .../src/com/jpexs/asdec/SWFOutputStream.java | 34 +- .../jpexs/asdec/tags/DefineBinaryData.java | 21 +- .../src/com/jpexs/asdec/tags/DefineBits.java | 21 +- .../com/jpexs/asdec/tags/DefineBitsJPEG2.java | 21 +- .../com/jpexs/asdec/tags/DefineBitsJPEG3.java | 21 +- .../jpexs/asdec/tags/DefineBitsLossless.java | 21 +- .../jpexs/asdec/tags/DefineBitsLossless2.java | 21 +- .../jpexs/asdec/tags/DefineButton2Tag.java | 6 +- .../com/jpexs/asdec/tags/DefineButtonTag.java | 6 +- .../src/com/jpexs/asdec/tags/DefineFont3.java | 21 +- .../src/com/jpexs/asdec/tags/DefineFont4.java | 21 +- .../asdec/tags/DefineFontAlignZones.java | 21 +- .../com/jpexs/asdec/tags/DefineFontName.java | 21 +- .../jpexs/asdec/tags/DefineScalingGrid.java | 21 +- .../src/com/jpexs/asdec/tags/DefineShape.java | 21 +- .../com/jpexs/asdec/tags/DefineShape2.java | 21 +- .../com/jpexs/asdec/tags/DefineShape3.java | 21 +- .../com/jpexs/asdec/tags/DefineShape4.java | 21 +- .../com/jpexs/asdec/tags/DefineSpriteTag.java | 20 +- trunk/src/com/jpexs/asdec/tags/DoABCTag.java | 4 +- .../src/com/jpexs/asdec/tags/DoActionTag.java | 9 +- .../com/jpexs/asdec/tags/DoInitActionTag.java | 7 +- .../com/jpexs/asdec/tags/ExportAssetsTag.java | 4 +- .../com/jpexs/asdec/tags/FileAttributes.java | 40 ++- .../src/com/jpexs/asdec/tags/FrameLabel.java | 21 +- .../src/com/jpexs/asdec/tags/JPEGTables.java | 21 +- trunk/src/com/jpexs/asdec/tags/Metadata.java | 21 +- .../com/jpexs/asdec/tags/PlaceObject2Tag.java | 4 +- .../com/jpexs/asdec/tags/PlaceObject3Tag.java | 16 +- .../src/com/jpexs/asdec/tags/ProductInfo.java | 21 +- .../com/jpexs/asdec/tags/RemoveObject2.java | 24 +- .../com/jpexs/asdec/tags/ScriptLimits.java | 21 +- .../jpexs/asdec/tags/SetBackgroundColor.java | 21 +- .../com/jpexs/asdec/tags/ShowFrameTag.java | 4 +- .../src/com/jpexs/asdec/tags/SymbolClass.java | 21 +- trunk/src/com/jpexs/asdec/tags/Tag.java | 18 +- .../jpexs/asdec/types/BUTTONCONDACTION.java | 3 +- .../jpexs/asdec/types/CLIPACTIONRECORD.java | 3 +- trunk/src/com/jpexs/asdec/types/RGB.java | 17 + 42 files changed, 841 insertions(+), 150 deletions(-) diff --git a/trunk/src/com/jpexs/asdec/Main.java b/trunk/src/com/jpexs/asdec/Main.java index 19869374e..a01d4fb2a 100644 --- a/trunk/src/com/jpexs/asdec/Main.java +++ b/trunk/src/com/jpexs/asdec/Main.java @@ -440,6 +440,8 @@ public class Main { * @param args the command line arguments */ public static void main(String[] args) throws IOException { + //updateLicenseInDir(new File("src/")); System.exit(0); //For automatic update of lincense in source files + View.setWinLookAndFeel(); loadReplacements(); if (args.length < 1) { diff --git a/trunk/src/com/jpexs/asdec/SWF.java b/trunk/src/com/jpexs/asdec/SWF.java index f37a199c3..ec2329630 100644 --- a/trunk/src/com/jpexs/asdec/SWF.java +++ b/trunk/src/com/jpexs/asdec/SWF.java @@ -135,20 +135,21 @@ public class SWF { throw new IOException("Invalid SWF file"); } version = is.read(); - SWFInputStream sis = new SWFInputStream(is, version); + SWFInputStream sis = new SWFInputStream(is, version, 4); fileSize = sis.readUI32(); if (hdr[0] == 'C') { - sis = new SWFInputStream(new InflaterInputStream(is), version); + sis = new SWFInputStream(new InflaterInputStream(is), version, 8); compressed = true; } displayRect = sis.readRECT(); - sis.readUI8(); + // FIXED8 (16 bit fixed point) frameRate + int tmpFirstByetOfFrameRate = sis.readUI8(); frameRate = sis.readUI8(); frameCount = sis.readUI16(); - tags = sis.readTagList(); + tags = sis.readTagList(0); } diff --git a/trunk/src/com/jpexs/asdec/SWFInputStream.java b/trunk/src/com/jpexs/asdec/SWFInputStream.java index f65008d42..2088b09e0 100644 --- a/trunk/src/com/jpexs/asdec/SWFInputStream.java +++ b/trunk/src/com/jpexs/asdec/SWFInputStream.java @@ -17,33 +17,178 @@ package com.jpexs.asdec; -import com.jpexs.asdec.action.Action; -import com.jpexs.asdec.action.swf3.*; -import com.jpexs.asdec.action.swf4.*; -import com.jpexs.asdec.action.swf5.*; -import com.jpexs.asdec.action.swf6.*; -import com.jpexs.asdec.action.swf7.*; -import com.jpexs.asdec.tags.*; -import com.jpexs.asdec.types.*; -import com.jpexs.asdec.types.filters.*; - -import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.PrintStream; import java.util.ArrayList; import java.util.List; import java.util.Stack; +import com.jpexs.asdec.action.Action; +import com.jpexs.asdec.action.swf3.ActionGetURL; +import com.jpexs.asdec.action.swf3.ActionGoToLabel; +import com.jpexs.asdec.action.swf3.ActionGotoFrame; +import com.jpexs.asdec.action.swf3.ActionNextFrame; +import com.jpexs.asdec.action.swf3.ActionPlay; +import com.jpexs.asdec.action.swf3.ActionPrevFrame; +import com.jpexs.asdec.action.swf3.ActionSetTarget; +import com.jpexs.asdec.action.swf3.ActionStop; +import com.jpexs.asdec.action.swf3.ActionStopSounds; +import com.jpexs.asdec.action.swf3.ActionToggleQuality; +import com.jpexs.asdec.action.swf3.ActionWaitForFrame; +import com.jpexs.asdec.action.swf4.ActionAdd; +import com.jpexs.asdec.action.swf4.ActionAnd; +import com.jpexs.asdec.action.swf4.ActionAsciiToChar; +import com.jpexs.asdec.action.swf4.ActionCall; +import com.jpexs.asdec.action.swf4.ActionCharToAscii; +import com.jpexs.asdec.action.swf4.ActionCloneSprite; +import com.jpexs.asdec.action.swf4.ActionDivide; +import com.jpexs.asdec.action.swf4.ActionEndDrag; +import com.jpexs.asdec.action.swf4.ActionEquals; +import com.jpexs.asdec.action.swf4.ActionGetProperty; +import com.jpexs.asdec.action.swf4.ActionGetTime; +import com.jpexs.asdec.action.swf4.ActionGetURL2; +import com.jpexs.asdec.action.swf4.ActionGetVariable; +import com.jpexs.asdec.action.swf4.ActionGotoFrame2; +import com.jpexs.asdec.action.swf4.ActionIf; +import com.jpexs.asdec.action.swf4.ActionJump; +import com.jpexs.asdec.action.swf4.ActionLess; +import com.jpexs.asdec.action.swf4.ActionMBAsciiToChar; +import com.jpexs.asdec.action.swf4.ActionMBCharToAscii; +import com.jpexs.asdec.action.swf4.ActionMBStringExtract; +import com.jpexs.asdec.action.swf4.ActionMBStringLength; +import com.jpexs.asdec.action.swf4.ActionMultiply; +import com.jpexs.asdec.action.swf4.ActionNot; +import com.jpexs.asdec.action.swf4.ActionOr; +import com.jpexs.asdec.action.swf4.ActionPop; +import com.jpexs.asdec.action.swf4.ActionPush; +import com.jpexs.asdec.action.swf4.ActionRandomNumber; +import com.jpexs.asdec.action.swf4.ActionRemoveSprite; +import com.jpexs.asdec.action.swf4.ActionSetProperty; +import com.jpexs.asdec.action.swf4.ActionSetTarget2; +import com.jpexs.asdec.action.swf4.ActionSetVariable; +import com.jpexs.asdec.action.swf4.ActionStartDrag; +import com.jpexs.asdec.action.swf4.ActionStringAdd; +import com.jpexs.asdec.action.swf4.ActionStringEquals; +import com.jpexs.asdec.action.swf4.ActionStringExtract; +import com.jpexs.asdec.action.swf4.ActionStringLength; +import com.jpexs.asdec.action.swf4.ActionStringLess; +import com.jpexs.asdec.action.swf4.ActionSubtract; +import com.jpexs.asdec.action.swf4.ActionToInteger; +import com.jpexs.asdec.action.swf4.ActionTrace; +import com.jpexs.asdec.action.swf4.ActionWaitForFrame2; +import com.jpexs.asdec.action.swf5.ActionAdd2; +import com.jpexs.asdec.action.swf5.ActionBitAnd; +import com.jpexs.asdec.action.swf5.ActionBitLShift; +import com.jpexs.asdec.action.swf5.ActionBitOr; +import com.jpexs.asdec.action.swf5.ActionBitRShift; +import com.jpexs.asdec.action.swf5.ActionBitURShift; +import com.jpexs.asdec.action.swf5.ActionBitXor; +import com.jpexs.asdec.action.swf5.ActionCallFunction; +import com.jpexs.asdec.action.swf5.ActionCallMethod; +import com.jpexs.asdec.action.swf5.ActionConstantPool; +import com.jpexs.asdec.action.swf5.ActionDecrement; +import com.jpexs.asdec.action.swf5.ActionDefineFunction; +import com.jpexs.asdec.action.swf5.ActionDefineLocal; +import com.jpexs.asdec.action.swf5.ActionDefineLocal2; +import com.jpexs.asdec.action.swf5.ActionDelete; +import com.jpexs.asdec.action.swf5.ActionDelete2; +import com.jpexs.asdec.action.swf5.ActionEnumerate; +import com.jpexs.asdec.action.swf5.ActionEquals2; +import com.jpexs.asdec.action.swf5.ActionGetMember; +import com.jpexs.asdec.action.swf5.ActionIncrement; +import com.jpexs.asdec.action.swf5.ActionInitArray; +import com.jpexs.asdec.action.swf5.ActionInitObject; +import com.jpexs.asdec.action.swf5.ActionLess2; +import com.jpexs.asdec.action.swf5.ActionModulo; +import com.jpexs.asdec.action.swf5.ActionNewMethod; +import com.jpexs.asdec.action.swf5.ActionNewObject; +import com.jpexs.asdec.action.swf5.ActionPushDuplicate; +import com.jpexs.asdec.action.swf5.ActionReturn; +import com.jpexs.asdec.action.swf5.ActionSetMember; +import com.jpexs.asdec.action.swf5.ActionStackSwap; +import com.jpexs.asdec.action.swf5.ActionStoreRegister; +import com.jpexs.asdec.action.swf5.ActionTargetPath; +import com.jpexs.asdec.action.swf5.ActionToNumber; +import com.jpexs.asdec.action.swf5.ActionToString; +import com.jpexs.asdec.action.swf5.ActionTypeOf; +import com.jpexs.asdec.action.swf5.ActionWith; +import com.jpexs.asdec.action.swf6.ActionEnumerate2; +import com.jpexs.asdec.action.swf6.ActionGreater; +import com.jpexs.asdec.action.swf6.ActionInstanceOf; +import com.jpexs.asdec.action.swf6.ActionStrictEquals; +import com.jpexs.asdec.action.swf6.ActionStringGreater; +import com.jpexs.asdec.action.swf7.ActionCastOp; +import com.jpexs.asdec.action.swf7.ActionDefineFunction2; +import com.jpexs.asdec.action.swf7.ActionExtends; +import com.jpexs.asdec.action.swf7.ActionImplementsOp; +import com.jpexs.asdec.action.swf7.ActionThrow; +import com.jpexs.asdec.action.swf7.ActionTry; +import com.jpexs.asdec.helpers.Helper; +import com.jpexs.asdec.tags.DefineBinaryData; +import com.jpexs.asdec.tags.DefineBits; +import com.jpexs.asdec.tags.DefineBitsJPEG2; +import com.jpexs.asdec.tags.DefineBitsJPEG3; +import com.jpexs.asdec.tags.DefineBitsLossless; +import com.jpexs.asdec.tags.DefineBitsLossless2; +import com.jpexs.asdec.tags.DefineButton2Tag; +import com.jpexs.asdec.tags.DefineButtonTag; +import com.jpexs.asdec.tags.DefineFont3; +import com.jpexs.asdec.tags.DefineFont4; +import com.jpexs.asdec.tags.DefineFontAlignZones; +import com.jpexs.asdec.tags.DefineFontName; +import com.jpexs.asdec.tags.DefineScalingGrid; +import com.jpexs.asdec.tags.DefineShape; +import com.jpexs.asdec.tags.DefineShape2; +import com.jpexs.asdec.tags.DefineShape3; +import com.jpexs.asdec.tags.DefineShape4; +import com.jpexs.asdec.tags.DefineSpriteTag; +import com.jpexs.asdec.tags.DoABCTag; +import com.jpexs.asdec.tags.DoActionTag; +import com.jpexs.asdec.tags.DoInitActionTag; +import com.jpexs.asdec.tags.ExportAssetsTag; +import com.jpexs.asdec.tags.FileAttributes; +import com.jpexs.asdec.tags.FrameLabel; +import com.jpexs.asdec.tags.JPEGTables; +import com.jpexs.asdec.tags.Metadata; +import com.jpexs.asdec.tags.PlaceObject2Tag; +import com.jpexs.asdec.tags.PlaceObject3Tag; +import com.jpexs.asdec.tags.ProductInfo; +import com.jpexs.asdec.tags.RemoveObject2; +import com.jpexs.asdec.tags.ScriptLimits; +import com.jpexs.asdec.tags.SetBackgroundColor; +import com.jpexs.asdec.tags.ShowFrameTag; +import com.jpexs.asdec.tags.SymbolClass; +import com.jpexs.asdec.tags.Tag; +import com.jpexs.asdec.types.BUTTONCONDACTION; +import com.jpexs.asdec.types.BUTTONRECORD; +import com.jpexs.asdec.types.CLIPACTIONRECORD; +import com.jpexs.asdec.types.CLIPACTIONS; +import com.jpexs.asdec.types.CLIPEVENTFLAGS; +import com.jpexs.asdec.types.CXFORMWITHALPHA; +import com.jpexs.asdec.types.MATRIX; +import com.jpexs.asdec.types.RECT; +import com.jpexs.asdec.types.RGBA; +import com.jpexs.asdec.types.filters.BEVELFILTER; +import com.jpexs.asdec.types.filters.BLURFILTER; +import com.jpexs.asdec.types.filters.COLORMATRIXFILTER; +import com.jpexs.asdec.types.filters.CONVOLUTIONFILTER; +import com.jpexs.asdec.types.filters.DROPSHADOWFILTER; +import com.jpexs.asdec.types.filters.FILTER; +import com.jpexs.asdec.types.filters.GLOWFILTER; +import com.jpexs.asdec.types.filters.GRADIENTBEVELFILTER; +import com.jpexs.asdec.types.filters.GRADIENTGLOWFILTER; + /** * Class for reading data from SWF file * * @author JPEXS */ public class SWFInputStream extends InputStream { - private InputStream is; + private InputStream is; private Stack margedPos = new Stack(); - private long pos = 0; + private long pos; private int version; /** @@ -52,9 +197,20 @@ public class SWFInputStream extends InputStream { * @param is Existing inputstream * @param version Version of SWF to read */ - public SWFInputStream(InputStream is, int version) { + public SWFInputStream(InputStream is, int version, long startingPos) { this.version = version; this.is = is; + pos = startingPos; + } + + /** + * Constructor + * + * @param is Existing inputstream + * @param version Version of SWF to read + */ + public SWFInputStream(InputStream is, int version) { + this(is, version, 0L); } /** @@ -79,6 +235,14 @@ public class SWFInputStream extends InputStream { return is.read(); } + @Override + public int read(byte[] b, int off, int len) throws IOException { + int bytesRead = super.read(b, off, len); + bitPos = 0; + pos += bytesRead; + return bytesRead; + } + private void alignByte() { bitPos = 0; } @@ -395,17 +559,46 @@ public class SWFInputStream extends InputStream { return ret; } + private static void dumpTag(PrintStream out, int version, Tag tag, int level) { + StringBuilder sb = new StringBuilder(); + sb.append(Helper.formatHex((int)tag.getPos(), 8)); + sb.append(": "); + sb.append(Helper.indent(level, "")); + sb.append(Helper.format(tag.toString(), 25 - 2*level)); + sb.append(" tagId="); + sb.append(Helper.formatInt(tag.getId(), 3)); + sb.append(" len="); + sb.append(Helper.formatInt((int)tag.getOrigDataLength(), 8)); + sb.append(" "); + sb.append(Helper.bytesToHexString(64, tag.getData(version), 0)); + out.println(sb.toString()); +// out.println(Utils.formatHex((int)tag.getPos(), 8) + ": " + Utils.indent(level, "") + Utils.format(tag.toString(), 25 - 2*level) + " tagId="+tag.getId()+" len="+tag.getOrigDataLength()+": "+Utils.bytesToHexString(64, tag.getData(version), 0)); + if (tag.hasSubTags()) { + for (Tag subTag: tag.getSubTags()) { + dumpTag(out, version, subTag, level + 1); + } + } + } + /** * Reads list of tags from the stream. Reading ends with End tag(=0) or end of the stream. * * @return List of tags * @throws IOException */ - public List readTagList() throws IOException { + public List readTagList(int level) throws IOException { List tags = new ArrayList(); Tag tag; - while ((tag = readTag()) != null) { + while (true) { + long pos = getPos(); + tag = readTag(level, pos); + if (tag == null) { + break; + } tags.add(tag); + if (Main.DUMP_TAGS && level == 0) { + dumpTag(System.out, version, tag, level); + } } return tags; } @@ -416,7 +609,7 @@ public class SWFInputStream extends InputStream { * @return Tag or null when End tag * @throws IOException */ - public Tag readTag() throws IOException { + public Tag readTag(int level, long pos) throws IOException { int tagIDTagLength = readUI16(); int tagID = (tagIDTagLength) >> 6; if (tagID == 0) { @@ -432,109 +625,109 @@ public class SWFInputStream extends InputStream { Tag ret; switch (tagID) { case 82: - ret = new DoABCTag(data, version); + ret = new DoABCTag(data, version, pos); break; case 12: - ret = new DoActionTag(data, version); + ret = new DoActionTag(data, version, pos); break; case 59: - ret = new DoInitActionTag(data, version); + ret = new DoInitActionTag(data, version, pos); break; case 39: - ret = new DefineSpriteTag(data, version); + ret = new DefineSpriteTag(data, version, level, pos); break; case 1: - ret = new ShowFrameTag(); + ret = new ShowFrameTag(pos); break; case 26: - ret = new PlaceObject2Tag(data, version); + ret = new PlaceObject2Tag(data, version, pos); break; case 56: - ret = new ExportAssetsTag(data, version); + ret = new ExportAssetsTag(data, version, pos); break; case 70: - ret = new PlaceObject3Tag(data, version); + ret = new PlaceObject3Tag(data, version, pos); break; case 7: - ret = new DefineButtonTag(data, version); + ret = new DefineButtonTag(data, version, pos); break; case 34: - ret = new DefineButton2Tag(data, version); + ret = new DefineButton2Tag(data, version, pos); break; case 69: - ret = new FileAttributes(data); + ret = new FileAttributes(data, version, pos); break; case 77: - ret = new Metadata(data); + ret = new Metadata(data, pos); break; case 65: - ret = new ScriptLimits(data, version); + ret = new ScriptLimits(data, version, pos); break; case 9: - ret = new SetBackgroundColor(data); + ret = new SetBackgroundColor(data, pos); break; case 41: - ret = new ProductInfo(data, version); + ret = new ProductInfo(data, version, pos); break; case 43: - ret = new FrameLabel(data, version); + ret = new FrameLabel(data, version, pos); break; case 36: - ret = new DefineBitsLossless2(data, version); + ret = new DefineBitsLossless2(data, version, pos); break; case 76: - ret = new SymbolClass(data, version); + ret = new SymbolClass(data, version, pos); break; case 32: - ret = new DefineShape3(data, version); + ret = new DefineShape3(data, version, pos); break; case 28: - ret = new RemoveObject2(data, version); + ret = new RemoveObject2(data, version, pos); break; case 78: - ret = new DefineScalingGrid(data, version); + ret = new DefineScalingGrid(data, version, pos); break; case 2: - ret = new DefineShape(data, version); + ret = new DefineShape(data, version, pos); break; case 22: - ret = new DefineShape2(data, version); + ret = new DefineShape2(data, version, pos); break; case 83: - ret = new DefineShape4(data, version); + ret = new DefineShape4(data, version, pos); break; case 20: - ret = new DefineBitsLossless(data, version); + ret = new DefineBitsLossless(data, version, pos); break; case 35: - ret = new DefineBitsJPEG3(data, version); + ret = new DefineBitsJPEG3(data, version, pos); break; case 87: - ret = new DefineBinaryData(data, version); + ret = new DefineBinaryData(data, version, pos); break; case 8: - ret = new JPEGTables(data); + ret = new JPEGTables(data, pos); break; case 6: - ret = new DefineBits(data, version); + ret = new DefineBits(data, version, pos); break; case 21: - ret = new DefineBitsJPEG2(data, version); + ret = new DefineBitsJPEG2(data, version, pos); break; case 75: - ret = new DefineFont3(data, version); + ret = new DefineFont3(data, version, pos); break; case 73: - ret = new DefineFontAlignZones(data, version); + ret = new DefineFontAlignZones(data, version, pos); break; case 88: - ret = new DefineFontName(data, version); - break; + ret = new DefineFontName(data, version, pos); + break; case 91: - ret = new DefineFont4(data, version); + ret = new DefineFont4(data, version, pos); break; default: - ret = new Tag(tagID, data); + ret = new Tag(tagID, data, pos); } ret.forceWriteAsLong = readLong; return ret; diff --git a/trunk/src/com/jpexs/asdec/SWFOutputStream.java b/trunk/src/com/jpexs/asdec/SWFOutputStream.java index 593f15378..b797c033b 100644 --- a/trunk/src/com/jpexs/asdec/SWFOutputStream.java +++ b/trunk/src/com/jpexs/asdec/SWFOutputStream.java @@ -17,16 +17,33 @@ package com.jpexs.asdec; -import com.jpexs.asdec.action.Action; -import com.jpexs.asdec.tags.Tag; -import com.jpexs.asdec.types.*; -import com.jpexs.asdec.types.filters.*; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.List; +import com.jpexs.asdec.abc.NotSameException; +import com.jpexs.asdec.helpers.Helper; +import com.jpexs.asdec.tags.Tag; +import com.jpexs.asdec.types.BUTTONCONDACTION; +import com.jpexs.asdec.types.BUTTONRECORD; +import com.jpexs.asdec.types.CLIPACTIONRECORD; +import com.jpexs.asdec.types.CLIPACTIONS; +import com.jpexs.asdec.types.CLIPEVENTFLAGS; +import com.jpexs.asdec.types.CXFORMWITHALPHA; +import com.jpexs.asdec.types.MATRIX; +import com.jpexs.asdec.types.RECT; +import com.jpexs.asdec.types.RGBA; +import com.jpexs.asdec.types.filters.BEVELFILTER; +import com.jpexs.asdec.types.filters.BLURFILTER; +import com.jpexs.asdec.types.filters.COLORMATRIXFILTER; +import com.jpexs.asdec.types.filters.CONVOLUTIONFILTER; +import com.jpexs.asdec.types.filters.DROPSHADOWFILTER; +import com.jpexs.asdec.types.filters.FILTER; +import com.jpexs.asdec.types.filters.GLOWFILTER; +import com.jpexs.asdec.types.filters.GRADIENTBEVELFILTER; +import com.jpexs.asdec.types.filters.GRADIENTGLOWFILTER; + /** * Class for writing data into SWF file * @@ -342,7 +359,12 @@ public class SWFOutputStream extends OutputStream { */ public void writeTags(List tags) throws IOException { for (Tag tag : tags) { - writeTag(tag); + //try { + writeTag(tag); + /*} catch (NotSameException nse) { + throw new RuntimeException("error in tag "+tag+" at pos "+Helper.formatHex((int)tag.getPos(), 8), nse); + }*/ + //NotSameException must be processed in order to catch it elsewhere } } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineBinaryData.java b/trunk/src/com/jpexs/asdec/tags/DefineBinaryData.java index 7323e4139..33cc1da20 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineBinaryData.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineBinaryData.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineBinaryData extends Tag { - public DefineBinaryData(byte[] data, int version) { - super(87, data); + public DefineBinaryData(byte[] data, int version, long pos) { + super(87, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineBits.java b/trunk/src/com/jpexs/asdec/tags/DefineBits.java index 16a0439b7..1ec363136 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineBits.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineBits.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineBits extends Tag { - public DefineBits(byte[] data, int version) { - super(6, data); + public DefineBits(byte[] data, int version, long pos) { + super(6, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG2.java b/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG2.java index db83e653e..3a9c4342a 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG2.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG2.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineBitsJPEG2 extends Tag { - public DefineBitsJPEG2(byte[] data, int version) { - super(21, data); + public DefineBitsJPEG2(byte[] data, int version, long pos) { + super(21, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG3.java b/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG3.java index 00b5948c8..864c9257d 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG3.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineBitsJPEG3.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineBitsJPEG3 extends Tag { - public DefineBitsJPEG3(byte[] data, int version) { - super(35, data); + public DefineBitsJPEG3(byte[] data, int version, long pos) { + super(35, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless.java b/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless.java index afdb42c00..453cbf143 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineBitsLossless extends Tag { - public DefineBitsLossless(byte[] data, int version) { - super(20, data); + public DefineBitsLossless(byte[] data, int version, long pos) { + super(20, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless2.java b/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless2.java index 6e79ea66d..8eb10c9df 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless2.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineBitsLossless2.java @@ -1,11 +1,28 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.IOException; public class DefineBitsLossless2 extends Tag { - public DefineBitsLossless2(byte[] data, int version) throws IOException { - super(36, data); + public DefineBitsLossless2(byte[] data, int version, long pos) throws IOException { + super(36, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineButton2Tag.java b/trunk/src/com/jpexs/asdec/tags/DefineButton2Tag.java index 1eee706dd..9ec9ed55f 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineButton2Tag.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineButton2Tag.java @@ -66,8 +66,8 @@ public class DefineButton2Tag extends Tag implements Container { * @param version SWF version * @throws IOException */ - public DefineButton2Tag(byte data[], int version) throws IOException { - super(34, data); + public DefineButton2Tag(byte data[], int version, long pos) throws IOException { + super(34, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); buttonId = sis.readUI16(); sis.readUB(7); //reserved @@ -138,7 +138,7 @@ public class DefineButton2Tag extends Tag implements Container { sos.writeBUTTONCONDACTIONList(actions); sos.close(); } catch (IOException e) { - + e.printStackTrace(); } return baos.toByteArray(); } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineButtonTag.java b/trunk/src/com/jpexs/asdec/tags/DefineButtonTag.java index e6ea1ff93..30a628d80 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineButtonTag.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineButtonTag.java @@ -64,8 +64,8 @@ public class DefineButtonTag extends Tag implements ASMSource { * @param version SWF version * @throws IOException */ - public DefineButtonTag(byte[] data, int version) throws IOException { - super(7, data); + public DefineButtonTag(byte[] data, int version, long pos) throws IOException { + super(7, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); buttonId = sis.readUI16(); characters = sis.readBUTTONRECORDList(false); @@ -127,7 +127,7 @@ public class DefineButtonTag extends Tag implements ASMSource { try { actions = (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { - + ex.printStackTrace(); } return Action.actionsToString(actions, null, version); } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineFont3.java b/trunk/src/com/jpexs/asdec/tags/DefineFont3.java index 982a0126a..e6d3d2581 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineFont3.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineFont3.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineFont3 extends Tag { - public DefineFont3(byte[] data, int version) { - super(75, data); + public DefineFont3(byte[] data, int version, long pos) { + super(75, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineFont4.java b/trunk/src/com/jpexs/asdec/tags/DefineFont4.java index d029720f0..b656579a2 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineFont4.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineFont4.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineFont4 extends Tag { - public DefineFont4(byte[] data, int version) { - super(91, data); + public DefineFont4(byte[] data, int version, long pos) { + super(91, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineFontAlignZones.java b/trunk/src/com/jpexs/asdec/tags/DefineFontAlignZones.java index 0c6250711..88af25a25 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineFontAlignZones.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineFontAlignZones.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineFontAlignZones extends Tag { - public DefineFontAlignZones(byte[] data, int version) { - super(73, data); + public DefineFontAlignZones(byte[] data, int version, long pos) { + super(73, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineFontName.java b/trunk/src/com/jpexs/asdec/tags/DefineFontName.java index 0b3a50a3c..5ad7d59c7 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineFontName.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineFontName.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.ByteArrayInputStream; @@ -11,8 +28,8 @@ public class DefineFontName extends Tag { private String fontName; private String fontCopyright; - public DefineFontName(byte[] data, int version) throws IOException { - super(88, data); + public DefineFontName(byte[] data, int version, long pos) throws IOException { + super(88, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontId = sis.readUI16(); fontName = sis.readString(); diff --git a/trunk/src/com/jpexs/asdec/tags/DefineScalingGrid.java b/trunk/src/com/jpexs/asdec/tags/DefineScalingGrid.java index 0cd34e767..300fae95a 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineScalingGrid.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineScalingGrid.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.ByteArrayInputStream; @@ -11,8 +28,8 @@ public class DefineScalingGrid extends Tag { private int characterId; private RECT splitter; - public DefineScalingGrid(byte[] data, int version) throws IOException { - super(78, data); + public DefineScalingGrid(byte[] data, int version, long pos) throws IOException { + super(78, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterId = sis.readUI16(); splitter = sis.readRECT(); diff --git a/trunk/src/com/jpexs/asdec/tags/DefineShape.java b/trunk/src/com/jpexs/asdec/tags/DefineShape.java index 883a98c8a..48fe3b03b 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineShape.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineShape.java @@ -1,11 +1,28 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.IOException; public class DefineShape extends Tag { - public DefineShape(byte[] data, int version) throws IOException { - super(2, data); + public DefineShape(byte[] data, int version, long pos) throws IOException { + super(2, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineShape2.java b/trunk/src/com/jpexs/asdec/tags/DefineShape2.java index 815f12c5a..88f4d2107 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineShape2.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineShape2.java @@ -1,11 +1,28 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.IOException; public class DefineShape2 extends Tag { - public DefineShape2(byte[] data, int version) throws IOException { - super(22, data); + public DefineShape2(byte[] data, int version, long pos) throws IOException { + super(22, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineShape3.java b/trunk/src/com/jpexs/asdec/tags/DefineShape3.java index 88433a2fe..ae54ad839 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineShape3.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineShape3.java @@ -1,11 +1,28 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.IOException; public class DefineShape3 extends Tag { - public DefineShape3(byte[] data, int version) throws IOException { - super(32, data); + public DefineShape3(byte[] data, int version, long pos) throws IOException { + super(32, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/DefineShape4.java b/trunk/src/com/jpexs/asdec/tags/DefineShape4.java index 38ca749d3..43568c794 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineShape4.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineShape4.java @@ -1,9 +1,26 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; public class DefineShape4 extends Tag { - public DefineShape4(byte[] data, int version) { - super(83, data); + public DefineShape4(byte[] data, int version, long pos) { + super(83, data, pos); } @Override diff --git a/trunk/src/com/jpexs/asdec/tags/DefineSpriteTag.java b/trunk/src/com/jpexs/asdec/tags/DefineSpriteTag.java index f44d5f5cd..301a4171f 100644 --- a/trunk/src/com/jpexs/asdec/tags/DefineSpriteTag.java +++ b/trunk/src/com/jpexs/asdec/tags/DefineSpriteTag.java @@ -51,6 +51,8 @@ public class DefineSpriteTag extends Tag implements Container { */ public List exportAssetsTags = new ArrayList(); + private int level; + /** * Constructor * @@ -58,12 +60,12 @@ public class DefineSpriteTag extends Tag implements Container { * @param version SWF version * @throws IOException */ - public DefineSpriteTag(byte[] data, int version) throws IOException { - super(39, data); - SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + public DefineSpriteTag(byte[] data, int version, int level, long pos) throws IOException { + super(39, data, pos); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version, pos); spriteId = sis.readUI16(); frameCount = sis.readUI16(); - subTags = sis.readTagList(); + subTags = sis.readTagList(level + 1); } @@ -130,4 +132,14 @@ public class DefineSpriteTag extends Tag implements Container { public int getItemCount() { return subTags.size(); } + + @Override + public boolean hasSubTags() { + return true; + } + + @Override + public List getSubTags() { + return subTags; + } } diff --git a/trunk/src/com/jpexs/asdec/tags/DoABCTag.java b/trunk/src/com/jpexs/asdec/tags/DoABCTag.java index 399731a49..37c4bb44a 100644 --- a/trunk/src/com/jpexs/asdec/tags/DoABCTag.java +++ b/trunk/src/com/jpexs/asdec/tags/DoABCTag.java @@ -66,8 +66,8 @@ public class DoABCTag extends Tag { * @param version SWF version * @throws IOException */ - public DoABCTag(byte[] data, int version) throws IOException { - super(82, data); + public DoABCTag(byte[] data, int version, long pos) throws IOException { + super(82, data, pos); InputStream is = new ByteArrayInputStream(data); SWFInputStream sis = new SWFInputStream(is, version); flags = sis.readUI32(); diff --git a/trunk/src/com/jpexs/asdec/tags/DoActionTag.java b/trunk/src/com/jpexs/asdec/tags/DoActionTag.java index 0a1e44c63..ee805ffa4 100644 --- a/trunk/src/com/jpexs/asdec/tags/DoActionTag.java +++ b/trunk/src/com/jpexs/asdec/tags/DoActionTag.java @@ -45,15 +45,15 @@ public class DoActionTag extends Tag implements ASMSource { * @param version SWF version * @throws IOException */ - public DoActionTag(byte[] data, int version) { - super(12, data); + public DoActionTag(byte[] data, int version, long pos) { + super(12, data, pos); try { ByteArrayInputStream bais = new ByteArrayInputStream(data); SWFInputStream sis = new SWFInputStream(bais, version); //actions = sis.readActionList(); actionBytes=sis.readBytes(sis.available()); } catch (IOException e) { - + e.printStackTrace(); } } @@ -79,7 +79,7 @@ public class DoActionTag extends Tag implements ASMSource { try { actions = (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { - + ex.printStackTrace(); } return Action.actionsToString(actions, null, version); } @@ -108,6 +108,7 @@ public class DoActionTag extends Tag implements ASMSource { try { return (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { + ex.printStackTrace(); return new ArrayList(); } } diff --git a/trunk/src/com/jpexs/asdec/tags/DoInitActionTag.java b/trunk/src/com/jpexs/asdec/tags/DoInitActionTag.java index ac2f13d88..7aabe5aa2 100644 --- a/trunk/src/com/jpexs/asdec/tags/DoInitActionTag.java +++ b/trunk/src/com/jpexs/asdec/tags/DoInitActionTag.java @@ -50,8 +50,8 @@ public class DoInitActionTag extends Tag implements ASMSource { * @param version SWF version * @throws IOException */ - public DoInitActionTag(byte[] data, int version) throws IOException { - super(59, data); + public DoInitActionTag(byte[] data, int version, long pos) throws IOException { + super(59, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); spriteId = sis.readUI16(); //actions = sis.readActionList(); @@ -116,7 +116,7 @@ public class DoInitActionTag extends Tag implements ASMSource { try { actions = (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { - + ex.printStackTrace(); } return Action.actionsToString(actions, null, version); } @@ -125,6 +125,7 @@ public class DoInitActionTag extends Tag implements ASMSource { try { return (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { + ex.printStackTrace(); return new ArrayList(); } } diff --git a/trunk/src/com/jpexs/asdec/tags/ExportAssetsTag.java b/trunk/src/com/jpexs/asdec/tags/ExportAssetsTag.java index 20fb97528..e2ab5c9e7 100644 --- a/trunk/src/com/jpexs/asdec/tags/ExportAssetsTag.java +++ b/trunk/src/com/jpexs/asdec/tags/ExportAssetsTag.java @@ -41,8 +41,8 @@ public class ExportAssetsTag extends Tag { * @param version SWF version * @throws IOException */ - public ExportAssetsTag(byte[] data, int version) throws IOException { - super(56, data); + public ExportAssetsTag(byte[] data, int version, long pos) throws IOException { + super(56, data, pos); assets = new HashMap(); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); int count = sis.readUI16(); diff --git a/trunk/src/com/jpexs/asdec/tags/FileAttributes.java b/trunk/src/com/jpexs/asdec/tags/FileAttributes.java index 2a014516a..210a3bb52 100644 --- a/trunk/src/com/jpexs/asdec/tags/FileAttributes.java +++ b/trunk/src/com/jpexs/asdec/tags/FileAttributes.java @@ -1,5 +1,27 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; +import java.io.ByteArrayInputStream; +import java.io.IOException; + +import com.jpexs.asdec.SWFInputStream; + public class FileAttributes extends Tag { private boolean useDirectBlit; @@ -8,15 +30,17 @@ public class FileAttributes extends Tag { private boolean actionScript3; private boolean useNetwork; - public FileAttributes(byte[] data) { - super(69, data); + public FileAttributes(byte[] data, int version, long pos) throws IOException { + super(69, data, pos); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); + sis.readUB(1); // reserved // UB[1] == 0 (reserved) - useDirectBlit = (data[0] & 0x40) != 0; - useGPU = (data[0] & 0x20) != 0; - hasMetadata = (data[0] & 0x10) != 0; - actionScript3 = (data[0] & 0x08) != 0; - // UB[2] == 0 (reserved) - useNetwork = (data[0] & 0x01) != 0; + useDirectBlit = sis.readUB(1) != 0; + useGPU = sis.readUB(1) != 0; + hasMetadata = sis.readUB(1) != 0; + actionScript3 = sis.readUB(1) != 0; + sis.readUB(2); // reserved + useNetwork = sis.readUB(1) != 0; // UB[24] == 0 (reserved) } diff --git a/trunk/src/com/jpexs/asdec/tags/FrameLabel.java b/trunk/src/com/jpexs/asdec/tags/FrameLabel.java index d5a096306..95141d414 100644 --- a/trunk/src/com/jpexs/asdec/tags/FrameLabel.java +++ b/trunk/src/com/jpexs/asdec/tags/FrameLabel.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.ByteArrayInputStream; @@ -9,8 +26,8 @@ public class FrameLabel extends Tag { private String name; - public FrameLabel(byte[] data, int version) throws IOException { - super(43, data); + public FrameLabel(byte[] data, int version, long pos) throws IOException { + super(43, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); name = sis.readString(); } diff --git a/trunk/src/com/jpexs/asdec/tags/JPEGTables.java b/trunk/src/com/jpexs/asdec/tags/JPEGTables.java index b4b656252..e8fcd493e 100644 --- a/trunk/src/com/jpexs/asdec/tags/JPEGTables.java +++ b/trunk/src/com/jpexs/asdec/tags/JPEGTables.java @@ -1,11 +1,28 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.IOException; public class JPEGTables extends Tag { - public JPEGTables(byte[] data) throws IOException { - super(8, data); + public JPEGTables(byte[] data, long pos) throws IOException { + super(8, data, pos); // TODO Auto-generated constructor stub } diff --git a/trunk/src/com/jpexs/asdec/tags/Metadata.java b/trunk/src/com/jpexs/asdec/tags/Metadata.java index fb8f01890..7a97a5d53 100644 --- a/trunk/src/com/jpexs/asdec/tags/Metadata.java +++ b/trunk/src/com/jpexs/asdec/tags/Metadata.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.UnsupportedEncodingException; @@ -6,8 +23,8 @@ public class Metadata extends Tag { private String xmlMetadata; - public Metadata(byte[] data) { - super(77, data); + public Metadata(byte[] data, long pos) { + super(77, data, pos); try { xmlMetadata = new String(data, "UTF-8"); } catch (UnsupportedEncodingException e) { diff --git a/trunk/src/com/jpexs/asdec/tags/PlaceObject2Tag.java b/trunk/src/com/jpexs/asdec/tags/PlaceObject2Tag.java index 1b2f8e96e..77809d1da 100644 --- a/trunk/src/com/jpexs/asdec/tags/PlaceObject2Tag.java +++ b/trunk/src/com/jpexs/asdec/tags/PlaceObject2Tag.java @@ -166,8 +166,8 @@ public class PlaceObject2Tag extends Tag implements Container { * @param version SWF version * @throws IOException */ - public PlaceObject2Tag(byte data[], int version) throws IOException { - super(26, data); + public PlaceObject2Tag(byte data[], int version, long pos) throws IOException { + super(26, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); placeFlagHasClipActions = sis.readUB(1) == 1; placeFlagHasClipDepth = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/asdec/tags/PlaceObject3Tag.java b/trunk/src/com/jpexs/asdec/tags/PlaceObject3Tag.java index b755eddff..73714e301 100644 --- a/trunk/src/com/jpexs/asdec/tags/PlaceObject3Tag.java +++ b/trunk/src/com/jpexs/asdec/tags/PlaceObject3Tag.java @@ -150,6 +150,8 @@ public class PlaceObject3Tag extends Tag implements Container { * If PlaceFlagHasClipActions, Clip Actions Data */ public CLIPACTIONS clipActions; + // FIXME bug found in ecoDrive.swf, + private boolean bitmapCacheBug; /** @@ -211,7 +213,9 @@ public class PlaceObject3Tag extends Tag implements Container { sos.writeUI8(blendMode); } if (placeFlagHasCacheAsBitmap) { - sos.writeUI8(bitmapCache); + if (!bitmapCacheBug) { + sos.writeUI8(bitmapCache); + } } if (placeFlagHasClipActions) { sos.writeCLIPACTIONS(clipActions); @@ -230,8 +234,8 @@ public class PlaceObject3Tag extends Tag implements Container { * @param version SWF version * @throws IOException */ - public PlaceObject3Tag(byte data[], int version) throws IOException { - super(70, data); + public PlaceObject3Tag(byte data[], int version, long pos) throws IOException { + super(70, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); placeFlagHasClipActions = sis.readUB(1) == 1; placeFlagHasClipDepth = sis.readUB(1) == 1; @@ -276,8 +280,14 @@ public class PlaceObject3Tag extends Tag implements Container { if (placeFlagHasBlendMode) { blendMode = sis.readUI8(); } + bitmapCacheBug = false; if (placeFlagHasCacheAsBitmap) { bitmapCache = sis.readUI8(); + if (bitmapCache == -1) { + // EOF + bitmapCacheBug = true; + bitmapCache = 1; + } } if (placeFlagHasClipActions) { clipActions = sis.readCLIPACTIONS(); diff --git a/trunk/src/com/jpexs/asdec/tags/ProductInfo.java b/trunk/src/com/jpexs/asdec/tags/ProductInfo.java index a1d8acb1e..6c33711fe 100644 --- a/trunk/src/com/jpexs/asdec/tags/ProductInfo.java +++ b/trunk/src/com/jpexs/asdec/tags/ProductInfo.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.ByteArrayInputStream; @@ -15,8 +32,8 @@ public class ProductInfo extends Tag { private long buildHigh; private long compilationDate; - public ProductInfo(byte[] data, int version) throws IOException { - super(41, data); + public ProductInfo(byte[] data, int version, long pos) throws IOException { + super(41, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); /* * 0: Unknown diff --git a/trunk/src/com/jpexs/asdec/tags/RemoveObject2.java b/trunk/src/com/jpexs/asdec/tags/RemoveObject2.java index 9533419dc..0b7879be4 100644 --- a/trunk/src/com/jpexs/asdec/tags/RemoveObject2.java +++ b/trunk/src/com/jpexs/asdec/tags/RemoveObject2.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.ByteArrayInputStream; @@ -9,10 +26,9 @@ public class RemoveObject2 extends Tag { private int depth; - public RemoveObject2(byte[] data, int version) throws IOException { - super(28, data); - ByteArrayInputStream bais = new ByteArrayInputStream(data); - SWFInputStream sis = new SWFInputStream(bais, version); + public RemoveObject2(byte[] data, int version, long pos) throws IOException { + super(28, data, pos); + SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); depth = sis.readUI16(); } diff --git a/trunk/src/com/jpexs/asdec/tags/ScriptLimits.java b/trunk/src/com/jpexs/asdec/tags/ScriptLimits.java index 69372ec39..62ae5c177 100644 --- a/trunk/src/com/jpexs/asdec/tags/ScriptLimits.java +++ b/trunk/src/com/jpexs/asdec/tags/ScriptLimits.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.ByteArrayInputStream; @@ -10,8 +27,8 @@ public class ScriptLimits extends Tag { private int maxRecursionDepth; private int scriptTimeoutSeconds; - public ScriptLimits(byte[] data, int version) throws IOException { - super(65, data); + public ScriptLimits(byte[] data, int version, long pos) throws IOException { + super(65, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); maxRecursionDepth = sis.readUI16(); scriptTimeoutSeconds = sis.readUI16(); diff --git a/trunk/src/com/jpexs/asdec/tags/SetBackgroundColor.java b/trunk/src/com/jpexs/asdec/tags/SetBackgroundColor.java index 29024bffb..214980b38 100644 --- a/trunk/src/com/jpexs/asdec/tags/SetBackgroundColor.java +++ b/trunk/src/com/jpexs/asdec/tags/SetBackgroundColor.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import com.jpexs.asdec.types.RGB; @@ -6,8 +23,8 @@ public class SetBackgroundColor extends Tag { private RGB backgroundColor; - public SetBackgroundColor(byte[] data) { - super(9, data); + public SetBackgroundColor(byte[] data, long pos) { + super(9, data, pos); backgroundColor = new RGB(); backgroundColor.red = data[0] & 0xff; backgroundColor.green = data[1] & 0xff; diff --git a/trunk/src/com/jpexs/asdec/tags/ShowFrameTag.java b/trunk/src/com/jpexs/asdec/tags/ShowFrameTag.java index a4a6bb8af..5b7257d75 100644 --- a/trunk/src/com/jpexs/asdec/tags/ShowFrameTag.java +++ b/trunk/src/com/jpexs/asdec/tags/ShowFrameTag.java @@ -26,8 +26,8 @@ public class ShowFrameTag extends Tag { /** * Constructor */ - public ShowFrameTag() { - super(1, new byte[0]); + public ShowFrameTag(long pos) { + super(1, new byte[0], pos); } /** diff --git a/trunk/src/com/jpexs/asdec/tags/SymbolClass.java b/trunk/src/com/jpexs/asdec/tags/SymbolClass.java index a85c22d9b..dec3c9cbc 100644 --- a/trunk/src/com/jpexs/asdec/tags/SymbolClass.java +++ b/trunk/src/com/jpexs/asdec/tags/SymbolClass.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.tags; import java.io.ByteArrayInputStream; @@ -9,8 +26,8 @@ public class SymbolClass extends Tag { private int tagIDs[]; private String classNames[]; - public SymbolClass(byte[] data, int version) throws IOException { - super(76, data); + public SymbolClass(byte[] data, int version, long pos) throws IOException { + super(76, data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); int numSymbols = sis.readUI16(); tagIDs = new int[numSymbols]; diff --git a/trunk/src/com/jpexs/asdec/tags/Tag.java b/trunk/src/com/jpexs/asdec/tags/Tag.java index 154129338..0be346e1f 100644 --- a/trunk/src/com/jpexs/asdec/tags/Tag.java +++ b/trunk/src/com/jpexs/asdec/tags/Tag.java @@ -17,6 +17,8 @@ package com.jpexs.asdec.tags; +import java.util.List; + /** * Represents Tag inside SWF file */ @@ -35,6 +37,8 @@ public class Tag { */ public boolean forceWriteAsLong = false; + private final long pos; + /** * Returns identifier of tag type * @@ -50,9 +54,10 @@ public class Tag { * @param id Tag type identifier * @param data Bytes of data */ - public Tag(int id, byte[] data) { + public Tag(int id, byte[] data, long pos) { this.id = id; this.data = data; + this.pos = pos; } /** @@ -79,4 +84,15 @@ public class Tag { return data.length; } + public boolean hasSubTags() { + return false; + } + + public List getSubTags() { + return null; + } + + public long getPos() { + return pos; + } } diff --git a/trunk/src/com/jpexs/asdec/types/BUTTONCONDACTION.java b/trunk/src/com/jpexs/asdec/types/BUTTONCONDACTION.java index f3711b81f..a51bae233 100644 --- a/trunk/src/com/jpexs/asdec/types/BUTTONCONDACTION.java +++ b/trunk/src/com/jpexs/asdec/types/BUTTONCONDACTION.java @@ -117,7 +117,7 @@ public class BUTTONCONDACTION implements ASMSource { try { actions = (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { - + ex.printStackTrace(); } return Action.actionsToString(actions, null, version); } @@ -140,6 +140,7 @@ public class BUTTONCONDACTION implements ASMSource { try { return (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { + ex.printStackTrace(); return new ArrayList(); } } diff --git a/trunk/src/com/jpexs/asdec/types/CLIPACTIONRECORD.java b/trunk/src/com/jpexs/asdec/types/CLIPACTIONRECORD.java index 10e3b6eb0..570fcb85a 100644 --- a/trunk/src/com/jpexs/asdec/types/CLIPACTIONRECORD.java +++ b/trunk/src/com/jpexs/asdec/types/CLIPACTIONRECORD.java @@ -82,7 +82,7 @@ public class CLIPACTIONRECORD implements ASMSource { try { actions = (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { - + ex.printStackTrace(); } return Action.actionsToString(actions, null, version); } @@ -101,6 +101,7 @@ public class CLIPACTIONRECORD implements ASMSource { try { return (new SWFInputStream(new ByteArrayInputStream(actionBytes), version)).readActionList(); } catch (IOException ex) { + ex.printStackTrace(); return new ArrayList(); } } diff --git a/trunk/src/com/jpexs/asdec/types/RGB.java b/trunk/src/com/jpexs/asdec/types/RGB.java index 1b349579d..38271f412 100644 --- a/trunk/src/com/jpexs/asdec/types/RGB.java +++ b/trunk/src/com/jpexs/asdec/types/RGB.java @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2010-2011 JPEXS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.jpexs.asdec.types; /**