From d571b899c661be30d0d1488cd8d4f332a556d59c Mon Sep 17 00:00:00 2001 From: Honfika Date: Mon, 9 Sep 2013 11:46:04 +0200 Subject: [PATCH] array definitions was inconsistent, now everywhere "Type[] variableName", using StringBuilder => little bit faster, test fixed (missing parameters) --- trunk/src/com/jpexs/decompiler/flash/SWF.java | 40 +++++++++--------- .../decompiler/flash/SWFInputStream.java | 14 +++---- .../decompiler/flash/SWFOutputStream.java | 12 +++--- .../com/jpexs/decompiler/flash/abc/ABC.java | 26 ++++++------ .../decompiler/flash/abc/ABCInputStream.java | 18 ++++---- .../decompiler/flash/abc/ABCOutputStream.java | 4 +- .../flash/abc/CopyOutputStream.java | 2 +- .../decompiler/flash/abc/ScriptPack.java | 2 +- .../decompiler/flash/abc/avm2/AVM2Code.java | 26 ++++++------ .../decompiler/flash/abc/avm2/CodeStats.java | 2 +- .../flash/abc/avm2/ConstantPool.java | 16 +++---- .../avm2/instructions/AVM2Instruction.java | 6 +-- .../instructions/InstructionDefinition.java | 4 +- .../flash/abc/avm2/parser/ASM3Parser.java | 2 +- .../decompiler/flash/abc/types/Decimal.java | 4 +- .../flash/abc/types/InstanceInfo.java | 2 +- .../flash/abc/types/MetadataInfo.java | 4 +- .../flash/abc/types/MethodBody.java | 8 ++-- .../flash/abc/types/MethodInfo.java | 8 ++-- .../decompiler/flash/abc/types/Multiname.java | 4 +- .../decompiler/flash/abc/types/Namespace.java | 6 +-- .../flash/abc/types/NamespaceSet.java | 2 +- .../decompiler/flash/abc/types/ValueKind.java | 4 +- .../flash/abc/types/traits/Trait.java | 4 +- .../abc/types/traits/TraitSlotConst.java | 2 +- .../flash/abc/types/traits/Traits.java | 42 +++++++++++++------ .../parser/script/ActionSourceGenerator.java | 4 +- .../flash/action/swf3/ActionGetURL.java | 2 +- .../flash/action/swf3/ActionGoToLabel.java | 2 +- .../flash/action/swf3/ActionSetTarget.java | 2 +- .../action/swf5/ActionDefineFunction.java | 4 +- .../action/swf7/ActionDefineFunction2.java | 2 +- .../decompiler/flash/flv/FLVOutputStream.java | 4 +- .../decompiler/flash/gui/ExportDialog.java | 8 ++-- .../decompiler/flash/gui/ImagePanel.java | 2 +- .../com/jpexs/decompiler/flash/gui/Main.java | 10 ++--- .../jpexs/decompiler/flash/gui/MainFrame.java | 18 ++++---- .../flash/gui/SelectLanguageDialog.java | 2 +- .../com/jpexs/decompiler/flash/gui/View.java | 4 +- .../flash/gui/abc/ClassesListTree.java | 2 +- .../flash/gui/abc/MethodBodyParamsPanel.java | 2 +- .../abc/tablemodels/DecimalTableModel.java | 4 +- .../gui/abc/tablemodels/DoubleTableModel.java | 4 +- .../gui/abc/tablemodels/IntTableModel.java | 4 +- .../abc/tablemodels/MultinameTableModel.java | 4 +- .../tablemodels/NamespaceSetTableModel.java | 4 +- .../abc/tablemodels/NamespaceTableModel.java | 4 +- .../gui/abc/tablemodels/StringTableModel.java | 4 +- .../gui/abc/tablemodels/UIntTableModel.java | 4 +- .../flash/gui/player/FlashPlayerPanel.java | 2 +- .../flash/gui/proxy/ProxyFrame.java | 4 +- .../flash/helpers/Highlighting.java | 2 +- .../flash/tags/CSMTextSettingsTag.java | 2 +- .../decompiler/flash/tags/DebugIDTag.java | 4 +- .../flash/tags/DefineBinaryDataTag.java | 4 +- .../flash/tags/DefineBitsJPEG2Tag.java | 4 +- .../flash/tags/DefineBitsJPEG3Tag.java | 10 ++--- .../flash/tags/DefineBitsJPEG4Tag.java | 10 ++--- .../flash/tags/DefineBitsLossless2Tag.java | 6 +-- .../flash/tags/DefineBitsLosslessTag.java | 6 +-- .../decompiler/flash/tags/DefineBitsTag.java | 8 ++-- .../flash/tags/DefineButton2Tag.java | 6 +-- .../flash/tags/DefineButtonCxformTag.java | 2 +- .../flash/tags/DefineButtonSoundTag.java | 2 +- .../flash/tags/DefineButtonTag.java | 4 +- .../flash/tags/DefineEditTextTag.java | 2 +- .../decompiler/flash/tags/DefineFont2Tag.java | 6 +-- .../decompiler/flash/tags/DefineFont3Tag.java | 8 ++-- .../decompiler/flash/tags/DefineFont4Tag.java | 4 +- .../flash/tags/DefineFontAlignZonesTag.java | 2 +- .../flash/tags/DefineFontInfo2Tag.java | 2 +- .../flash/tags/DefineFontInfoTag.java | 2 +- .../flash/tags/DefineFontNameTag.java | 2 +- .../decompiler/flash/tags/DefineFontTag.java | 2 +- .../flash/tags/DefineMorphShape2Tag.java | 4 +- .../flash/tags/DefineMorphShapeTag.java | 4 +- .../flash/tags/DefineScalingGridTag.java | 2 +- .../tags/DefineSceneAndFrameLabelDataTag.java | 10 ++--- .../flash/tags/DefineShape2Tag.java | 2 +- .../flash/tags/DefineShape3Tag.java | 2 +- .../flash/tags/DefineShape4Tag.java | 2 +- .../decompiler/flash/tags/DefineShapeTag.java | 2 +- .../decompiler/flash/tags/DefineSoundTag.java | 4 +- .../flash/tags/DefineSpriteTag.java | 2 +- .../decompiler/flash/tags/DefineText2Tag.java | 2 +- .../decompiler/flash/tags/DefineTextTag.java | 2 +- .../flash/tags/DefineVideoStreamTag.java | 2 +- .../decompiler/flash/tags/DoABCDefineTag.java | 2 +- .../jpexs/decompiler/flash/tags/DoABCTag.java | 2 +- .../decompiler/flash/tags/DoActionTag.java | 6 +-- .../flash/tags/DoInitActionTag.java | 10 ++--- .../flash/tags/EnableDebugger2Tag.java | 2 +- .../flash/tags/EnableDebuggerTag.java | 2 +- .../flash/tags/EnableTelemetryTag.java | 4 +- .../jpexs/decompiler/flash/tags/EndTag.java | 2 +- .../flash/tags/ExportAssetsTag.java | 2 +- .../flash/tags/FileAttributesTag.java | 2 +- .../decompiler/flash/tags/FrameLabelTag.java | 2 +- .../flash/tags/ImportAssets2Tag.java | 2 +- .../flash/tags/ImportAssetsTag.java | 2 +- .../decompiler/flash/tags/JPEGTablesTag.java | 2 +- .../decompiler/flash/tags/MetadataTag.java | 2 +- .../flash/tags/PlaceObject2Tag.java | 2 +- .../flash/tags/PlaceObject3Tag.java | 2 +- .../flash/tags/PlaceObject4Tag.java | 4 +- .../decompiler/flash/tags/PlaceObjectTag.java | 2 +- .../decompiler/flash/tags/ProductInfoTag.java | 2 +- .../decompiler/flash/tags/ProtectTag.java | 2 +- .../flash/tags/RemoveObject2Tag.java | 2 +- .../flash/tags/RemoveObjectTag.java | 2 +- .../flash/tags/ScriptLimitsTag.java | 2 +- .../flash/tags/SetBackgroundColorTag.java | 2 +- .../decompiler/flash/tags/SetTabIndexTag.java | 2 +- .../flash/tags/SoundStreamBlockTag.java | 2 +- .../flash/tags/SoundStreamHead2Tag.java | 2 +- .../flash/tags/SoundStreamHeadTag.java | 2 +- .../decompiler/flash/tags/StartSound2Tag.java | 2 +- .../decompiler/flash/tags/StartSoundTag.java | 2 +- .../decompiler/flash/tags/SymbolClassTag.java | 6 +-- .../com/jpexs/decompiler/flash/tags/Tag.java | 4 +- .../jpexs/decompiler/flash/tags/TagStub.java | 2 +- .../decompiler/flash/tags/VideoFrameTag.java | 2 +- .../decompiler/flash/tags/base/ASMSource.java | 2 +- .../decompiler/flash/tags/base/FontTag.java | 2 +- .../decompiler/flash/tags/base/ImageTag.java | 4 +- .../flash/tags/font/CharacterRanges.java | 8 ++-- .../flash/types/ALPHABITMAPDATA.java | 2 +- .../flash/types/ALPHACOLORMAPDATA.java | 4 +- .../decompiler/flash/types/BITMAPDATA.java | 4 +- .../decompiler/flash/types/COLORMAPDATA.java | 4 +- .../flash/types/FILLSTYLEARRAY.java | 2 +- .../decompiler/flash/types/FOCALGRADIENT.java | 2 +- .../decompiler/flash/types/GRADIENT.java | 2 +- .../flash/types/LINESTYLEARRAY.java | 4 +- .../flash/types/MORPHFILLSTYLEARRAY.java | 2 +- .../decompiler/flash/types/MORPHGRADIENT.java | 2 +- .../flash/types/MORPHLINESTYLEARRAY.java | 4 +- .../decompiler/flash/types/SOUNDINFO.java | 2 +- .../decompiler/flash/types/TEXTRECORD.java | 2 +- .../decompiler/flash/types/ZONERECORD.java | 2 +- .../types/filters/COLORMATRIXFILTER.java | 4 +- .../types/filters/CONVOLUTIONFILTER.java | 4 +- .../flash/types/filters/Filtering.java | 34 +++++++-------- .../types/filters/GRADIENTBEVELFILTER.java | 8 ++-- .../types/filters/GRADIENTGLOWFILTER.java | 6 +-- .../flash/types/shaperecords/SHAPERECORD.java | 20 ++++----- .../flash/types/sound/AdpcmDecoder.java | 12 +++--- .../flash/types/sound/MP3FRAME.java | 12 +++--- .../decompiler/flash/xfl/XFLConverter.java | 24 +++++------ .../src/com/jpexs/decompiler/graph/Graph.java | 6 +-- trunk/src/com/jpexs/helpers/Helper.java | 24 +++++------ .../process/win32/Win32ProcessTools.java | 10 ++--- .../sun/jna/platform/win32/Advapi32Util.java | 2 +- .../com/sun/jna/platform/win32/Kernel32.java | 2 +- .../src/com/sun/jna/platform/win32/WinNT.java | 6 +-- 155 files changed, 424 insertions(+), 406 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index d0015f9cd..7420bb0f6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -183,7 +183,7 @@ public class SWF { /** * LZMA Properties */ - public byte lzmaProperties[]; + public byte[] lzmaProperties; public FileAttributesTag fileAttributes; /** @@ -230,7 +230,7 @@ public class SWF { os.write('W'); os.write('S'); os.write(version); - byte data[] = baos.toByteArray(); + byte[] data = baos.toByteArray(); sos = new SWFOutputStream(os, version); sos.writeUI32(data.length + 8); @@ -252,7 +252,7 @@ public class SWF { enc.SetEndMarkerMode(true); enc.Code(new ByteArrayInputStream(data), baos, -1, -1, null); data = baos.toByteArray(); - byte udata[] = new byte[4]; + byte[] udata = new byte[4]; udata[0] = (byte) (data.length & 0xFF); udata[1] = (byte) ((data.length >> 8) & 0xFF); udata[2] = (byte) ((data.length >> 16) & 0xFF); @@ -297,7 +297,7 @@ public class SWF { * @throws IOException */ public SWF(InputStream is, ProgressListener listener, boolean parallelRead, boolean checkOnly) throws IOException { - byte hdr[] = new byte[3]; + byte[] hdr = new byte[3]; is.read(hdr); String shdr = new String(hdr, "utf-8"); if ((!shdr.equals("FWS")) && (!shdr.equals("CWS")) && (!shdr.equals("ZWS"))) { @@ -424,7 +424,7 @@ public class SWF { */ public static boolean fws2cws(InputStream fis, OutputStream fos) { try { - byte swfHead[] = new byte[8]; + byte[] swfHead = new byte[8]; fis.read(swfHead); if (swfHead[0] != 'F') { @@ -451,7 +451,7 @@ public class SWF { public static boolean decompress(InputStream fis, OutputStream fos) { try { - byte hdr[] = new byte[3]; + byte[] hdr = new byte[3]; fis.read(hdr); String shdr = new String(hdr, "utf-8"); if (shdr.equals("CWS")) { @@ -478,7 +478,7 @@ public class SWF { ByteArrayOutputStream baos = new ByteArrayOutputStream(); sis.readUI32(); //outSize int propertiesSize = 5; - byte lzmaProperties[] = new byte[propertiesSize]; + byte[] lzmaProperties = new byte[propertiesSize]; if (sis.read(lzmaProperties, 0, propertiesSize) != propertiesSize) { throw new IOException("LZMA:input .lzma file is too short"); } @@ -737,7 +737,7 @@ public class SWF { if (path == null) { path = ""; } - String pathParts[]; + String[] pathParts; if (path.contains(".")) { pathParts = path.split("\\."); } else { @@ -856,7 +856,7 @@ public class SWF { } } - public static boolean hasErrorHeader(byte data[]) { + public static boolean hasErrorHeader(byte[] data) { if (data.length > 4) { if ((data[0] & 0xff) == 0xff) { if ((data[1] & 0xff) == 0xd9) { @@ -939,7 +939,7 @@ public class SWF { if ((shead.getSoundFormat() == DefineSoundTag.FORMAT_ADPCM) && wave) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); for (int b = 0; b < blocks.size(); b++) { - byte data[] = blocks.get(b).getData(SWF.DEFAULT_VERSION); + byte[] data = blocks.get(b).getData(SWF.DEFAULT_VERSION); baos.write(data); } fos = new ByteArrayOutputStream(); @@ -947,7 +947,7 @@ public class SWF { } else if ((shead.getSoundFormat() == DefineSoundTag.FORMAT_MP3) && mp3) { fos = new ByteArrayOutputStream(); for (int b = 0; b < blocks.size(); b++) { - byte data[] = blocks.get(b).getData(SWF.DEFAULT_VERSION); + byte[] data = blocks.get(b).getData(SWF.DEFAULT_VERSION); fos.write(data, 4, data.length - 4); } } else { @@ -957,7 +957,7 @@ public class SWF { int ms = (int) (1000.0f / ((float) frameRate)); for (int b = 0; b < blocks.size(); b++) { - byte data[] = blocks.get(b).getData(SWF.DEFAULT_VERSION); + byte[] data = blocks.get(b).getData(SWF.DEFAULT_VERSION); if (shead.getSoundFormat() == 2) { //MP3 data = Arrays.copyOfRange(data, 4, data.length); } @@ -975,16 +975,16 @@ public class SWF { } } - private static void createWavFromAdpcm(OutputStream fos, int soundRate, int soundSize, int soundType, byte data[]) throws IOException { + private static void createWavFromAdpcm(OutputStream fos, int soundRate, int soundSize, int soundType, byte[] data) throws IOException { try { - byte pcmData[] = AdpcmDecoder.decode(data, soundType == 1 ? true : false); + byte[] pcmData = AdpcmDecoder.decode(data, soundType == 1 ? true : false); ByteArrayOutputStream subChunk1Data = new ByteArrayOutputStream(); int audioFormat = 1; //PCM writeLE(subChunk1Data, audioFormat, 2); int numChannels = soundType == 1 ? 2 : 1; writeLE(subChunk1Data, numChannels, 2); - int rateMap[] = {5512, 11025, 22050, 44100}; + int[] rateMap = {5512, 11025, 22050, 44100}; int sampleRate = rateMap[soundRate]; writeLE(subChunk1Data, sampleRate, 4); int bitsPerSample = soundSize == 1 ? 16 : 8; @@ -996,7 +996,7 @@ public class SWF { ByteArrayOutputStream chunks = new ByteArrayOutputStream(); chunks.write("fmt ".getBytes("utf-8")); - byte subChunk1DataBytes[] = subChunk1Data.toByteArray(); + byte[] subChunk1DataBytes = subChunk1Data.toByteArray(); writeLE(chunks, subChunk1DataBytes.length, 4); chunks.write(subChunk1DataBytes); @@ -1006,7 +1006,7 @@ public class SWF { chunks.write(pcmData); fos.write("RIFF".getBytes("utf-8")); - byte chunkBytes[] = chunks.toByteArray(); + byte[] chunkBytes = chunks.toByteArray(); writeLE(fos, 4 + chunkBytes.length, 4); fos.write("WAVE".getBytes("utf-8")); fos.write(chunkBytes); @@ -1773,7 +1773,7 @@ public class SWF { if (deobfuscated.containsKey(pkg)) { return deobfuscated.get(pkg); } - String parts[] = null; + String[] parts = null; if (pkg.contains(".")) { parts = pkg.split("\\."); } else { @@ -1919,7 +1919,7 @@ public class SWF { DoInitActionTag dia = (DoInitActionTag) t; String exportName = dia.getExportName(); final String pkgPrefix = "__Packages."; - String classNameParts[] = null; + String[] classNameParts = null; if ((exportName != null) && exportName.startsWith(pkgPrefix)) { String className = exportName.substring(pkgPrefix.length()); if (className.contains(".")) { @@ -2132,7 +2132,7 @@ public class SWF { private static class CachedImage implements Serializable { - private int data[]; + private int[] data; private int width; private int height; private int type; diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index 9d4d91c17..55654d935 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -345,7 +345,7 @@ public class SWFInputStream extends InputStream { } private long readLong() throws IOException { - byte readBuffer[] = readBytes(8); + byte[] readBuffer = readBytes(8); return (((long) readBuffer[3] << 56) + ((long) (readBuffer[2] & 255) << 48) + ((long) (readBuffer[1] & 255) << 40) @@ -412,7 +412,7 @@ public class SWFInputStream extends InputStream { if (count <= 0) { return new byte[0]; } - byte ret[] = new byte[(int) count]; + byte[] ret = new byte[(int) count]; for (int i = 0; i < count; i++) { ret[i] = (byte) readEx(); } @@ -420,10 +420,10 @@ public class SWFInputStream extends InputStream { } public byte[] readBytesZlib(long count) throws IOException { - byte data[] = readBytes(count); + byte[] data = readBytes(count); InflaterInputStream dis = new InflaterInputStream(new ByteArrayInputStream(data)); ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte buf[] = new byte[4096]; + byte[] buf = new byte[4096]; int c = 0; while ((c = dis.read(buf)) > 0) { baos.write(buf, 0, c); @@ -738,7 +738,7 @@ public class SWFInputStream extends InputStream { public static Tag resolveTag(SWF swf, Tag tag, int version, int level, boolean parallel, boolean skipUnusualTags) { Tag ret; - byte data[] = tag.getData(version); + byte[] data = tag.getData(version); long pos = tag.getPos(); try { switch (tag.getId()) { @@ -1022,10 +1022,10 @@ public class SWFInputStream extends InputStream { tagLength = readSI32(); readLong = true; } - byte data[] = readBytes((int) tagLength); + byte[] data = readBytes((int) tagLength); Tag ret = new Tag(swf, tagID, "Unknown", data, pos); ret.forceWriteAsLong = readLong; - byte dataNew[] = ret.getData(version); + byte[] dataNew = ret.getData(version); int ignoreFirst = 0; for (int i = 0; i < data.length; i++) { diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java index c262ccbd9..258a6f6dd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -193,7 +193,7 @@ public class SWFOutputStream extends OutputStream { } private void writeLong(long value) throws IOException { - byte writeBuffer[] = new byte[8]; + byte[] writeBuffer = new byte[8]; writeBuffer[3] = (byte) (value >>> 56); writeBuffer[2] = (byte) (value >>> 48); writeBuffer[1] = (byte) (value >>> 40); @@ -371,7 +371,7 @@ public class SWFOutputStream extends OutputStream { } } - public static byte[] getTagHeader(Tag tag, byte data[], int version) { + public static byte[] getTagHeader(Tag tag, byte[] data, int version) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { @@ -399,7 +399,7 @@ public class SWFOutputStream extends OutputStream { * @throws IOException */ public void writeTag(Tag tag) throws IOException { - byte data[] = tag.getData(version); + byte[] data = tag.getData(version); write(getTagHeader(tag, data, version)); write(data); } @@ -672,7 +672,7 @@ public class SWFOutputStream extends OutputStream { } sos.write(value.actionBytes); } - byte data[] = baos.toByteArray(); + byte[] data = baos.toByteArray(); writeUI32(data.length); //actionRecordSize write(data); } @@ -1014,7 +1014,7 @@ public class SWFOutputStream extends OutputStream { sos.writeUB(1, value.condOverDownToIddle ? 1 : 0); sos.write(value.actionBytes); } - byte data[] = baos.toByteArray(); + byte[] data = baos.toByteArray(); if (isLast) { writeUI16(0); } else { @@ -1628,7 +1628,7 @@ public class SWFOutputStream extends OutputStream { writeUI16(value.range); } - public void writeBytesZlib(byte data[]) throws IOException { + public void writeBytesZlib(byte[] data) throws IOException { DeflaterOutputStream deflater = new DeflaterOutputStream(this, new Deflater(9)); deflater.write(data); deflater.finish(); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java index e7bb5dca1..6f7b6e33d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -50,14 +50,14 @@ public class ABC { public int major_version = 0; public int minor_version = 0; public ConstantPool constants; - public MethodInfo method_info[]; - public MetadataInfo metadata_info[]; - public InstanceInfo instance_info[]; - public ClassInfo class_info[]; - public ScriptInfo script_info[]; - public MethodBody bodies[]; - private int bodyIdxFromMethodIdx[]; - public long stringOffsets[]; + public MethodInfo[] method_info; + public MetadataInfo[] metadata_info; + public InstanceInfo[] instance_info; + public ClassInfo[] class_info; + public ScriptInfo[] script_info; + public MethodBody[] bodies; + private int[] bodyIdxFromMethodIdx; + public long[] stringOffsets; public static final String IDENT_STRING = " "; public static final int MINORwithDECIMAL = 17; protected HashSet listeners = new HashSet<>(); @@ -375,11 +375,11 @@ public class ABC { for (int i = 0; i < metadata_count; i++) { int name_index = ais.readU30(); int values_count = ais.readU30(); - int keys[] = new int[values_count]; + int[] keys = new int[values_count]; for (int v = 0; v < values_count; v++) { keys[v] = ais.readU30(); } - int values[] = new int[values_count]; + int[] values = new int[values_count]; for (int v = 0; v < values_count; v++) { values[v] = ais.readU30(); } @@ -531,7 +531,7 @@ public class ABC { aos.writeU30(bodies[i].max_regs); aos.writeU30(bodies[i].init_scope_depth); aos.writeU30(bodies[i].max_scope_depth); - byte codeBytes[] = bodies[i].code.getBytes(); + byte[] codeBytes = bodies[i].code.getBytes(); aos.writeU30(codeBytes.length); aos.write(codeBytes); aos.writeU30(bodies[i].exceptions.length); @@ -601,7 +601,7 @@ public class ABC { } public static String addTabs(String s, int tabs) { - String parts[] = s.split("\r\n"); + String[] parts = s.split("\r\n"); if (!s.contains("\r\n")) { parts = s.split("\n"); } @@ -899,7 +899,7 @@ public class ABC { if (namesMap.containsKey(s)) { newName = constants.constant_string[strIndex] = namesMap.get(s); } else { - String parts[] = null; + String[] parts = null; if (s.contains(".")) { parts = s.split("\\."); } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java index 56bdf94e7..c4a985adc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java @@ -45,7 +45,7 @@ public class ABCInputStream extends InputStream { if (bufferOs == null) { return new byte[0]; } - byte ret[] = bufferOs.toByteArray(); + byte[] ret = bufferOs.toByteArray(); bufferOs.reset(); return ret; } @@ -164,7 +164,7 @@ public class ABCInputStream extends InputStream { } public final long readLong() throws IOException { - byte readBuffer[] = safeRead(8); + byte[] readBuffer = safeRead(8); return (((long) readBuffer[7] << 56) + ((long) (readBuffer[6] & 255) << 48) + ((long) (readBuffer[5] & 255) << 40) @@ -182,7 +182,7 @@ public class ABCInputStream extends InputStream { } private byte[] safeRead(int count) throws IOException { - byte ret[] = new byte[count]; + byte[] ret = new byte[count]; for (int i = 0; i < count; i++) { ret[i] = (byte) read(); } @@ -238,7 +238,7 @@ public class ABCInputStream extends InputStream { public MethodInfo readMethodInfo() throws IOException { int param_count = readU30(); int ret_type = readU30(); - int param_types[] = new int[param_count]; + int[] param_types = new int[param_count]; for (int i = 0; i < param_count; i++) { param_types[i] = readU30(); } @@ -247,7 +247,7 @@ public class ABCInputStream extends InputStream { //// 1=need_arguments, 2=need_activation, 4=need_rest 8=has_optional (16=ignore_rest, 32=explicit,) 64=setsdxns, 128=has_paramnames - ValueKind optional[] = new ValueKind[0]; + ValueKind[] optional = new ValueKind[0]; if ((flags & 8) == 8) { //if has_optional int optional_count = readU30(); optional = new ValueKind[optional_count]; @@ -256,7 +256,7 @@ public class ABCInputStream extends InputStream { } } - int param_names[] = new int[param_count]; + int[] param_names = new int[param_count]; if ((flags & 128) == 128) { //if has_paramnames for (int i = 0; i < param_count; i++) { param_names[i] = readU30(); @@ -335,7 +335,7 @@ public class ABCInputStream extends InputStream { } public byte[] readBytes(int count) throws IOException { - byte ret[] = new byte[count]; + byte[] ret = new byte[count]; for (int i = 0; i < count; i++) { ret[i] = (byte) read(); } @@ -343,7 +343,7 @@ public class ABCInputStream extends InputStream { } public Decimal readDecimal() throws IOException { - byte data[] = readBytes(16); + byte[] data = readBytes(16); return new Decimal(data); } @@ -367,7 +367,7 @@ public class ABCInputStream extends InputStream { public String readString() throws IOException { int length = readU30(); - byte b[] = safeRead(length); + byte[] b = safeRead(length); String r = new String(b, "UTF-8"); return r; } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java index dbbfc7b1e..c928c85a9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java @@ -118,7 +118,7 @@ public class ABCOutputStream extends OutputStream { } public void writeLong(long value) throws IOException { - byte writeBuffer[] = new byte[8]; + byte[] writeBuffer = new byte[8]; writeBuffer[7] = (byte) (value >>> 56); writeBuffer[6] = (byte) (value >>> 48); writeBuffer[5] = (byte) (value >>> 40); @@ -144,7 +144,7 @@ public class ABCOutputStream extends OutputStream { } public void writeString(String s) throws IOException { - byte sbytes[] = s.getBytes("UTF-8"); + byte[] sbytes = s.getBytes("UTF-8"); writeU30(sbytes.length); write(sbytes); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java index 6827d0c90..b7f81814e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/CopyOutputStream.java @@ -26,7 +26,7 @@ public class CopyOutputStream extends OutputStream { private InputStream is; private long pos = 0; private int TEMPSIZE = 5; - private int temp[] = new int[TEMPSIZE]; + private int[] temp = new int[TEMPSIZE]; private int tempPos = 0; public int ignoreFirst = 0; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index 2dc7cd4ee..8d9b70c08 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -89,7 +89,7 @@ public class ScriptPack { if (packageName.equals("")) { return ""; } - String pathParts[]; + String[] pathParts; if (packageName.contains(".")) { pathParts = packageName.split("\\."); } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index 6b47f0342..ac8fade16 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -113,7 +113,7 @@ public class AVM2Code implements Serializable { public static final int DAT_DECIMAL_INDEX = OPT_U30 + 0x11; public static final int DAT_CASE_BASEOFFSET = OPT_S24 + 0x12; public static final int DAT_DECIMAL_PARAMS = OPT_U30 + 0x13; - public static InstructionDefinition instructionSet[] = new InstructionDefinition[]{ + public static InstructionDefinition[] instructionSet = new InstructionDefinition[]{ new AddIns(), new InstructionDefinition(0x9b, "add_d", new int[]{}) { @Override @@ -557,11 +557,11 @@ public class AVM2Code implements Serializable { } }; //endoflist - public static InstructionDefinition instructionSetByCode[] = buildInstructionSetByCode(); + public static InstructionDefinition[] instructionSetByCode = buildInstructionSetByCode(); public boolean hideTemporaryRegisters = true; private static InstructionDefinition[] buildInstructionSetByCode() { - InstructionDefinition result[] = new InstructionDefinition[256]; + InstructionDefinition[] result = new InstructionDefinition[256]; for (InstructionDefinition id : instructionSet) { if (result[id.instructionCode] != null) { Logger.getLogger(AVM2Code.class.getName()).log(Level.WARNING, "Duplicate OPCODE for instruction {0} {1}", new Object[]{result[id.instructionCode], id}); @@ -627,7 +627,7 @@ public class AVM2Code implements Serializable { int instructionCode = ais.read(); InstructionDefinition instr = instructionSetByCode[instructionCode]; if (instr != null) { - int actualOperands[]; + int[] actualOperands; if (instructionCode == 0x1b) { //switch int firstOperand = ais.readS24(); int case_count = ais.readU30(); @@ -673,7 +673,7 @@ public class AVM2Code implements Serializable { return getBytes(null); } - public byte[] getBytes(byte origBytes[]) { + public byte[] getBytes(byte[] origBytes) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); OutputStream cos; @@ -721,7 +721,7 @@ public class AVM2Code implements Serializable { public String toASMSource(ConstantPool constants, MethodBody body, List outputMap, boolean hex, boolean highlight) { invalidateCache(); - StringBuffer ret = new StringBuffer(); + StringBuilder ret = new StringBuilder(); String t = ""; for (int e = 0; e < body.exceptions.length; e++) { ret.append("exception " + e + " m[" + body.exceptions[e].name_index + "]\"" + Helper.escapeString(body.exceptions[e].getVarName(constants, new ArrayList())) + "\" " @@ -932,7 +932,7 @@ public class AVM2Code implements Serializable { return pos2adr(fixIPAfterDebugLine(adr2pos(addr))); } - public ConvertOutput toSourceOutput(String path, GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, int start, int end, HashMap localRegNames, List fullyQualifiedNames, boolean visited[], HashMap localRegAssigmentIps, HashMap> refs) throws ConvertException { + public ConvertOutput toSourceOutput(String path, GraphPart part, boolean processJumps, boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap localRegs, Stack stack, Stack scopeStack, ABC abc, ConstantPool constants, MethodInfo[] method_info, MethodBody body, int start, int end, HashMap localRegNames, List fullyQualifiedNames, boolean[] visited, HashMap localRegAssigmentIps, HashMap> refs) throws ConvertException { boolean debugMode = DEBUG_MODE; if (debugMode) { System.out.println("OPEN SubSource:" + start + "-" + end + " " + code.get(start).toString() + " to " + code.get(end).toString()); @@ -1189,7 +1189,7 @@ public class AVM2Code implements Serializable { return ret.toString(); } - public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits, int staticOperation, HashMap localRegAssigmentIps, HashMap> refs) { + public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo[] method_info, MethodBody body, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits, int staticOperation, HashMap localRegAssigmentIps, HashMap> refs) { return toSource(path, isStatic, scriptIndex, classIndex, abc, constants, method_info, body, false, true, localRegNames, scopeStack, isStaticInitializer, fullyQualifiedNames, initTraits, staticOperation, localRegAssigmentIps, refs); } @@ -1260,7 +1260,7 @@ public class AVM2Code implements Serializable { ignoredIns = new ArrayList<>(); } - public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], MethodBody body, boolean hilighted, boolean replaceIndents, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits, int staticOperation, HashMap localRegAssigmentIps, HashMap> refs) { + public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo[] method_info, MethodBody body, boolean hilighted, boolean replaceIndents, HashMap localRegNames, Stack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits, int staticOperation, HashMap localRegAssigmentIps, HashMap> refs) { initToSource(); List list; String s; @@ -1329,7 +1329,7 @@ public class AVM2Code implements Serializable { } } //Declarations - boolean declaredRegisters[] = new boolean[regCount]; + boolean[] declaredRegisters = new boolean[regCount]; for (int b = 0; b < declaredRegisters.length; b++) { declaredRegisters[b] = false; } @@ -1714,7 +1714,7 @@ public class AVM2Code implements Serializable { return refs; } - private int visitCodeTrap(int ip, int visited[], AVM2Instruction prev, AVM2Instruction prev2) { + private int visitCodeTrap(int ip, int[] visited, AVM2Instruction prev, AVM2Instruction prev2) { int ret = 0; while (ip < visited.length) { visited[ip]++; @@ -1837,7 +1837,7 @@ public class AVM2Code implements Serializable { } } - public void restoreControlFlow(int ip, HashMap> refs, int visited2[], HashMap> appended) throws ConvertException { + public void restoreControlFlow(int ip, HashMap> refs, int[] visited2, HashMap> appended) throws ConvertException { List buf = new ArrayList<>(); boolean cont = false; int continueip = 0; @@ -1930,7 +1930,7 @@ public class AVM2Code implements Serializable { private void restoreControlFlowPass(ConstantPool constants, MethodBody body, boolean secondpass) { try { HashMap> refs; - int visited2[] = new int[code.size()]; + int[] visited2 = new int[code.size()]; refs = visitCode(body); HashMap> appended = new HashMap<>(); /*if (secondpass) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java index 7ae63b260..acb7eb45c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/CodeStats.java @@ -30,7 +30,7 @@ public class CodeStats { public int maxlocal = 0; public boolean has_set_dxns = false; public boolean has_activation = false; - public InstructionStats instructionStats[]; + public InstructionStats[] instructionStats; public String toString(boolean highlight, ABC abc, List fullyQualifiedNames) { String ret = "Stats: maxstack=" + maxstack + ", maxscope=" + maxscope + ", maxlocal=" + maxlocal + "\r\n"; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java index 8d8c685d7..6f1d86998 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/ConstantPool.java @@ -30,15 +30,15 @@ import java.util.logging.Logger; public class ConstantPool { - public long constant_int[]; - public long constant_uint[]; - public double constant_double[]; + public long[] constant_int; + public long[] constant_uint; + public double[] constant_double; /* Only for some minor versions */ - public Decimal constant_decimal[]; - public String constant_string[]; - public Namespace constant_namespace[]; - public NamespaceSet constant_namespace_set[]; - public Multiname constant_multiname[]; + public Decimal[] constant_decimal; + public String[] constant_string; + public Namespace[] constant_namespace; + public NamespaceSet[] constant_namespace_set; + public Multiname[] constant_multiname; public int addInt(long value) { constant_int = Arrays.copyOf(constant_int, constant_int.length + 1); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java index 2e7ed1fe9..ed4559b31 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java @@ -43,9 +43,9 @@ public class AVM2Instruction implements Serializable, GraphSourceItem { public static final long serialVersionUID = 1L; public InstructionDefinition definition; - public int operands[]; + public int[] operands; public long offset; - public byte bytes[]; + public byte[] bytes; public String comment; public boolean ignored = false; public String labelname; @@ -96,7 +96,7 @@ public class AVM2Instruction implements Serializable, GraphSourceItem { @Override public String toString() { - StringBuffer s = new StringBuffer(); + StringBuilder s = new StringBuilder(); s.append(definition.instructionName); for (int i = 0; i < operands.length; i++) { s.append(" "); diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 9b16be332..45be3ab7b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -45,11 +45,11 @@ public class InstructionDefinition implements Serializable { protected String hilighOffset(String text, long offset) { return Highlighting.hilighOffset(text, offset); } - public int operands[]; + public int[] operands; public String instructionName = ""; public int instructionCode = 0; - public InstructionDefinition(int instructionCode, String instructionName, int operands[]) { + public InstructionDefinition(int instructionCode, String instructionName, int[] operands) { this.instructionCode = instructionCode; this.instructionName = instructionName; this.operands = operands; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/ASM3Parser.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/ASM3Parser.java index 8ba718a13..d81f4411f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/ASM3Parser.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/ASM3Parser.java @@ -278,7 +278,7 @@ public class ASM3Parser { } } - int operands[] = new int[operandsList.size()]; + int[] operands = new int[operandsList.size()]; for (int i = 0; i < operandsList.size(); i++) { operands[i] = operandsList.get(i); } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/Decimal.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/Decimal.java index 8f0678d08..c4ac397ee 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/Decimal.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/Decimal.java @@ -22,9 +22,9 @@ package com.jpexs.decompiler.flash.abc.types; */ public class Decimal { - public byte data[]; + public byte[] data; - public Decimal(byte data[]) { + public Decimal(byte[] data) { this.data = data; } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java index 8fef86d6e..63ffe7ea7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java @@ -29,7 +29,7 @@ public class InstanceInfo { public int super_index; public int flags; // 1 = sealed, 0 = dynamic, 2 = final, 4 = interface, 8 = ProtectedNs public int protectedNS; //if flags & 8 - public int interfaces[]; + public int[] interfaces; public int iinit_index; // MethodInfo - constructor public Traits instance_traits; public static final int CLASS_SEALED = 1; //not dynamic diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java index 2ba1f4cc9..d91463577 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/MetadataInfo.java @@ -22,8 +22,8 @@ import com.jpexs.helpers.Helper; public class MetadataInfo { public int name_index; - public int keys[]; - public int values[]; + public int[] keys; + public int[] values; public MetadataInfo(int name_index, int[] keys, int[] values) { this.name_index = name_index; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java index 82b68da1b..e257ffb6e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -47,9 +47,9 @@ public class MethodBody implements Cloneable, Serializable { public int max_regs; public int init_scope_depth; public int max_scope_depth; - public byte codeBytes[]; + public byte[] codeBytes; public AVM2Code code; - public ABCException exceptions[] = new ABCException[0]; + public ABCException[] exceptions = new ABCException[0]; public Traits traits = new Traits(); public List getExceptionEntries() { @@ -108,7 +108,7 @@ public class MethodBody implements Cloneable, Serializable { return ret; } - public String toString(final String path, boolean pcode, final boolean isStatic, final int scriptIndex, final int classIndex, final ABC abc, final ConstantPool constants, final MethodInfo method_info[], final Stack scopeStack, final boolean isStaticInitializer, final boolean hilight, final boolean replaceIndents, final List fullyQualifiedNames, final Traits initTraits) { + public String toString(final String path, boolean pcode, final boolean isStatic, final int scriptIndex, final int classIndex, final ABC abc, final ConstantPool constants, final MethodInfo[] method_info, final Stack scopeStack, final boolean isStaticInitializer, final boolean hilight, final boolean replaceIndents, final List fullyQualifiedNames, final Traits initTraits) { if (debugMode) { System.err.println("Decompiling " + path); } @@ -139,7 +139,7 @@ public class MethodBody implements Cloneable, Serializable { return s; } - public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo method_info[], Stack scopeStack, boolean isStaticInitializer, boolean hilight, boolean replaceIndents, List fullyQualifiedNames, Traits initTraits) { + public String toSource(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, ConstantPool constants, MethodInfo[] method_info, Stack scopeStack, boolean isStaticInitializer, boolean hilight, boolean replaceIndents, List fullyQualifiedNames, Traits initTraits) { AVM2Code deobfuscated = null; MethodBody b = (MethodBody) Helper.deepCopy(this); deobfuscated = b.code; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java index 4019763cf..ce07d68bb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java @@ -25,13 +25,13 @@ import java.util.List; public class MethodInfo { - public int param_types[]; + public int[] param_types; public int ret_type; public int name_index; //0=no name // 1=need_arguments, 2=need_activation, 4=need_rest 8=has_optional 16=ignore_rest, 32=explicit, 64=setsdxns, 128=has_paramnames public int flags; - public ValueKind optional[]; - public int paramNames[]; + public ValueKind[] optional; + public int[] paramNames; private MethodBody body; public void setFlagSetsdxns() { @@ -156,7 +156,7 @@ public class MethodInfo { return (flags & 128) == 128; } - public MethodInfo(int param_types[], int ret_type, int name_index, int flags, ValueKind optional[], int paramNames[]) { + public MethodInfo(int[] param_types, int ret_type, int name_index, int flags, ValueKind[] optional, int[] paramNames) { this.param_types = param_types; this.ret_type = ret_type; this.name_index = name_index; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/Multiname.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/Multiname.java index db01cb231..822ad01a2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/Multiname.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/Multiname.java @@ -32,8 +32,8 @@ public class Multiname { public static final int MULTINAMEL = 0x1b; public static final int MULTINAMELA = 0x1c; public static final int TYPENAME = 0x1d; - private static final int multinameKinds[] = new int[]{QNAME, QNAMEA, MULTINAME, MULTINAMEA, RTQNAME, RTQNAMEA, MULTINAMEL, RTQNAMEL, RTQNAMELA, MULTINAMELA, TYPENAME}; - private static final String multinameKindNames[] = new String[]{"Qname", "QnameA", "Multiname", "MultinameA", "RTQname", "RTQnameA", "MultinameL", "RTQnameL", "RTQnameLA", "MultinameLA", "TypeName"}; + private static final int[] multinameKinds = new int[]{QNAME, QNAMEA, MULTINAME, MULTINAMEA, RTQNAME, RTQNAMEA, MULTINAMEL, RTQNAMEL, RTQNAMELA, MULTINAMELA, TYPENAME}; + private static final String[] multinameKindNames = new String[]{"Qname", "QnameA", "Multiname", "MultinameA", "RTQname", "RTQnameA", "MultinameL", "RTQnameL", "RTQnameLA", "MultinameLA", "TypeName"}; public int kind = -1; public int name_index = -1; public int namespace_index = -1; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/Namespace.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/Namespace.java index 0345d3569..ece189934 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/Namespace.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/Namespace.java @@ -28,9 +28,9 @@ public class Namespace { public static final int KIND_PROTECTED = 24; public static final int KIND_EXPLICIT = 25; public static final int KIND_STATIC_PROTECTED = 26; - public static final int nameSpaceKinds[] = new int[]{KIND_NAMESPACE, KIND_PRIVATE, KIND_PACKAGE, KIND_PACKAGE_INTERNAL, KIND_PROTECTED, KIND_EXPLICIT, KIND_STATIC_PROTECTED}; - public static final String nameSpaceKindNames[] = new String[]{"Namespace", "PrivateNamespace", "PackageNamespace", "PackageInternalNamespace", "ProtectedNamespace", "ExplicitNamespace", "StaticProtectedNamespace"}; - public static final String namePrefixes[] = new String[]{"", "private", "public", "", "protected", "explicit", "protected"}; + public static final int[] nameSpaceKinds = new int[]{KIND_NAMESPACE, KIND_PRIVATE, KIND_PACKAGE, KIND_PACKAGE_INTERNAL, KIND_PROTECTED, KIND_EXPLICIT, KIND_STATIC_PROTECTED}; + public static final String[] nameSpaceKindNames = new String[]{"Namespace", "PrivateNamespace", "PackageNamespace", "PackageInternalNamespace", "ProtectedNamespace", "ExplicitNamespace", "StaticProtectedNamespace"}; + public static final String[] namePrefixes = new String[]{"", "private", "public", "", "protected", "explicit", "protected"}; public int kind; public int name_index; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java index 9bbaba32b..8d9ab7074 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java @@ -20,7 +20,7 @@ import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; public class NamespaceSet { - public int namespaces[]; + public int[] namespaces; public String toString(ConstantPool constants) { String s = ""; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java index 922581cf5..c67115002 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java @@ -37,8 +37,8 @@ public class ValueKind { public static final int CONSTANT_ExplicitNamespace = 0x19;// Namespace public static final int CONSTANT_StaticProtectedNs = 0x1A;// Namespace public static final int CONSTANT_PrivateNs = 0x05;// namespace - private static final int optionalKinds[] = new int[]{0x03, 0x04, 0x06, 0x02, 0x01, 0x0B, 0x0A, 0x0C, 0x00, 0x08, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x05}; - private static final String optionalKindNames[] = new String[]{"Int", "UInt", "Double", "Decimal", "Utf8", "True", "False", "Null", "Undefined", "Namespace", "PackageNamespace", "PackageInternalNs", "ProtectedNamespace", "ExplicitNamespace", "StaticProtectedNs", "PrivateNs"}; + private static final int[] optionalKinds = new int[]{0x03, 0x04, 0x06, 0x02, 0x01, 0x0B, 0x0A, 0x0C, 0x00, 0x08, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x05}; + private static final String[] optionalKindNames = new String[]{"Int", "UInt", "Double", "Decimal", "Utf8", "True", "False", "Null", "Undefined", "Namespace", "PackageNamespace", "PackageInternalNs", "ProtectedNamespace", "ExplicitNamespace", "StaticProtectedNs", "PrivateNs"}; public int value_index; public int value_kind; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index 550a4044b..0a3c3bf57 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -33,9 +33,9 @@ public abstract class Trait implements Serializable { public int name_index; public int kindType; public int kindFlags; - public int metadata[] = new int[0]; + public int[] metadata = new int[0]; public long fileOffset; - public byte bytes[]; + public byte[] bytes; public static final int ATTR_Final = 0x1; public static final int ATTR_Override = 0x2; public static final int ATTR_Metadata = 0x4; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java index d062c74c7..17616ccc6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java @@ -135,7 +135,7 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { if (valueStr != null) { ret += " = "; int befLen = ret.length(); - String valueStrParts[] = valueStr.split("\r\n"); + String[] valueStrParts = valueStr.split("\r\n"); boolean first = true; for (int i = 0; i < valueStrParts.length; i++) { if (valueStrParts[i].equals("")) { diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java index 100bbe2d8..f307a31a0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java @@ -32,7 +32,7 @@ import java.util.logging.Logger; public class Traits implements Serializable { - public Trait traits[] = new Trait[0]; + public Trait[] traits = new Trait[0]; public int removeTraps(int scriptIndex, int classIndex, boolean isStatic, ABC abc, String path) { int ret = 0; @@ -98,7 +98,7 @@ public class Traits implements Serializable { } @Override - public String call() throws Exception { + public String call() { String plus; if (makePackages) { plus = trait.convertPackaged(path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, parallel); @@ -123,25 +123,43 @@ public class Traits implements Serializable { } public String convert(String path, List abcTags, ABC abc, boolean isStatic, boolean pcode, boolean makePackages, int scriptIndex, int classIndex, boolean highlighting, List fullyQualifiedNames, boolean parallel) { - String s = ""; - ExecutorService executor = Executors.newFixedThreadPool(parallel ? 20 : 1); - List> futureResults = new ArrayList<>(); + StringBuilder sb = new StringBuilder(); + ExecutorService executor = null; + List> futureResults = null; + List traitConvertTasks = null; + + if (parallel) { + executor = Executors.newFixedThreadPool(20); + futureResults = new ArrayList<>(); + } else { + traitConvertTasks = new ArrayList<>(); + } + pcode = true; for (int t = 0; t < traits.length; t++) { - Future future = executor.submit(new TraitConvertTask(traits[t], makePackages, path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, t, parallel)); - futureResults.add(future); + TraitConvertTask task = new TraitConvertTask(traits[t], makePackages, path, abcTags, abc, isStatic, pcode, scriptIndex, classIndex, highlighting, fullyQualifiedNames, t, parallel); + if (parallel) { + Future future = executor.submit(task); + futureResults.add(future); + } else { + traitConvertTasks.add(task); + } } - for (int f = 0; f < futureResults.size(); f++) { + int taskCount = parallel ? futureResults.size() : traitConvertTasks.size(); + for (int f = 0; f < taskCount; f++) { if (f > 0) { - s += "\r\n\r\n"; + sb.append("\r\n\r\n"); } try { - s += futureResults.get(f).get(); + String taskResult = parallel ? futureResults.get(f).get() : traitConvertTasks.get(f).call(); + sb.append(taskResult); } catch (InterruptedException | ExecutionException ex) { Logger.getLogger(Traits.class.getName()).log(Level.SEVERE, "Error during traits converting", ex); } } - executor.shutdown(); - return s; + if (parallel) { + executor.shutdown(); + } + return sb.toString(); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java index 9d869ccac..9867d71da 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionSourceGenerator.java @@ -139,7 +139,7 @@ public class ActionSourceGenerator implements SourceGenerator { onFalse = generateToActionList(localData, onFalseCmds); } } - byte onTrueBytes[] = Action.actionsToBytes(onTrue, false, SWF.DEFAULT_VERSION); + byte[] onTrueBytes = Action.actionsToBytes(onTrue, false, SWF.DEFAULT_VERSION); int onTrueLen = onTrueBytes.length; ActionIf ifaif = new ActionIf(0); @@ -157,7 +157,7 @@ public class ActionSourceGenerator implements SourceGenerator { onTrueLen += ajmp.getBytes(SWF.DEFAULT_VERSION).length; } ifaif.setJumpOffset(onTrueLen); - byte onFalseBytes[] = Action.actionsToBytes(onFalse, false, SWF.DEFAULT_VERSION); + byte[] onFalseBytes = Action.actionsToBytes(onFalse, false, SWF.DEFAULT_VERSION); int onFalseLen = onFalseBytes.length; if (ajmp != null) { ajmp.setJumpOffset(onFalseLen); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java index 459a3576f..ec5bfaebd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java @@ -49,7 +49,7 @@ public class ActionGetURL extends Action { public ActionGetURL(int actionLength, SWFInputStream sis, int version) throws IOException { super(0x83, actionLength); - //byte data[] = sis.readBytes(actionLength); + //byte[] data = sis.readBytes(actionLength); //sis = new SWFInputStream(new ByteArrayInputStream(data), version); urlString = sis.readString(); targetString = sis.readString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java index a5a966001..1b5f54a8c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionGoToLabel.java @@ -41,7 +41,7 @@ public class ActionGoToLabel extends Action { public ActionGoToLabel(int actionLength, SWFInputStream sis, int version) throws IOException { super(0x8C, actionLength); - //byte data[] = sis.readBytes(actionLength); + //byte[] data = sis.readBytes(actionLength); //sis = new SWFInputStream(new ByteArrayInputStream(data), version); label = sis.readString(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java index e93731d8d..5a112a3de 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf3/ActionSetTarget.java @@ -41,7 +41,7 @@ public class ActionSetTarget extends Action { public ActionSetTarget(int actionLength, SWFInputStream sis, int version) throws IOException { super(0x8B, actionLength); - //byte data[] = sis.readBytes(actionLength); + //byte[] data = sis.readBytes(actionLength); //sis = new SWFInputStream(new ByteArrayInputStream(data), version); targetName = sis.readString(); } diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java index 7eeaa311d..1fbdc38d1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf5/ActionDefineFunction.java @@ -58,7 +58,7 @@ public class ActionDefineFunction extends Action implements GraphSourceItemConta public ActionDefineFunction(int actionLength, SWFInputStream sis, ReReadableInputStream rri, int version) throws IOException { super(0x9B, actionLength); this.version = version; - //byte data[]=sis.readBytes(actionLength); + //byte[] data=sis.readBytes(actionLength); //sis=new SWFInputStream(new ByteArrayInputStream(data),version); long startPos = sis.getPos(); functionName = sis.readString(); @@ -117,7 +117,7 @@ public class ActionDefineFunction extends Action implements GraphSourceItemConta for (String s : paramNames) { sos.writeString(s); } - //byte codeBytes[] = Action.actionsToBytes(code, false, version); + //byte[] codeBytes = Action.actionsToBytes(code, false, version); sos.writeUI16(codeSize); //codeBytes.length); sos.close(); diff --git a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java index da4fbceb8..77532c54f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/swf7/ActionDefineFunction2.java @@ -183,7 +183,7 @@ public class ActionDefineFunction2 extends Action implements GraphSourceItemCont sos.writeUI8(paramRegisters.get(i)); sos.writeString(paramNames.get(i)); } - //byte codeBytes[] = Action.actionsToBytes(code, false, version); + //byte[] codeBytes = Action.actionsToBytes(code, false, version); sos.writeUI16(codeSize);//codeBytes.length); sos.close(); diff --git a/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java index 735696473..978c488ee 100644 --- a/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/flv/FLVOutputStream.java @@ -125,7 +125,7 @@ public class FLVOutputStream extends OutputStream { public void writeTag(FLVTAG tag) throws IOException { long posBefore = getPos(); writeUI8(tag.tagType); - byte data[] = tag.data.getBytes(); + byte[] data = tag.data.getBytes(); writeUI24(data.length); writeUI24(tag.timeStamp & 0xffffff); writeUI8((int) ((tag.timeStamp >> 24) & 0xff)); @@ -149,7 +149,7 @@ public class FLVOutputStream extends OutputStream { } private void writeLong(long value) throws IOException { - byte writeBuffer[] = new byte[8]; + byte[] writeBuffer = new byte[8]; writeBuffer[3] = (byte) (value >>> 56); writeBuffer[2] = (byte) (value >>> 48); writeBuffer[1] = (byte) (value >>> 40); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java index ab18c985c..4b4e6ed08 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ExportDialog.java @@ -20,7 +20,7 @@ import javax.swing.JPanel; public class ExportDialog extends AppDialog { boolean cancelled = false; - String options[][] = { + String[][] options = { {translate("shapes.svg")}, {translate("texts.plain"), translate("texts.formatted")}, {translate("images.pngjpeg")}, @@ -28,7 +28,7 @@ public class ExportDialog extends AppDialog { {translate("sounds.mp3wavflv"), translate("sounds.flv")}, {translate("actionscript.as"), translate("actionscript.pcode")} }; - String optionNames[] = { + String[] optionNames = { translate("shapes"), translate("texts"), translate("images"), @@ -42,7 +42,7 @@ public class ExportDialog extends AppDialog { public static final int OPTION_MOVIES = 3; public static final int OPTION_SOUNDS = 4; public static final int OPTION_ACTIONSCRIPT = 5; - private JComboBox combos[]; + private JComboBox[] combos; public int getOption(int index) { return combos[index].getSelectedIndex(); @@ -61,7 +61,7 @@ public class ExportDialog extends AppDialog { cnt.setLayout(new BorderLayout()); JPanel comboPanel = new JPanel(null); combos = new JComboBox[optionNames.length]; - JLabel labels[] = new JLabel[optionNames.length]; + JLabel[] labels = new JLabel[optionNames.length]; int labWidth = 0; for (int i = 0; i < optionNames.length; i++) { labels[i] = new JLabel(optionNames[i]); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index 7599b0393..fd41b0509 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -92,7 +92,7 @@ public class ImagePanel extends JPanel implements ActionListener, FlashDisplay { } } - public void setImage(byte data[]) { + public void setImage(byte[] data) { setBackground(View.swfBackgroundColor); if (timer != null) { timer.cancel(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index 88b2749ad..72921afd3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -107,7 +107,7 @@ public class Main { } loadFromMemoryFrame.setVisible(true); } - private static String commandlineConfigBoolean[] = new String[]{ + private static String[] commandlineConfigBoolean = new String[]{ "decompile", "parallelSpeedUp", "internalFlashViewer", @@ -482,7 +482,7 @@ public class Main { } String license = "/*\r\n * Copyright (C) {year} {author}\r\n * \r\n * This program is free software: you can redistribute it and/or modify\r\n * it under the terms of the GNU General Public License as published by\r\n * the Free Software Foundation, either version 3 of the License, or\r\n * (at your option) any later version.\r\n * \r\n * This program is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU General Public License for more details.\r\n * \r\n * You should have received a copy of the GNU General Public License\r\n * along with this program. If not, see .\r\n */"; - File files[] = dir.listFiles(); + File[] files = dir.listFiles(); for (File f : files) { if (f.isDirectory()) { updateLicenseInDir(f); @@ -864,7 +864,7 @@ public class Main { if (args.length < pos + 4) { badArguments(); } - String validExportFormats[] = new String[]{ + String[] validExportFormats = new String[]{ "as", "pcode", "image", @@ -1040,7 +1040,7 @@ public class Main { } private static void setConfigurations(String cfgStr) { - String cfgs[]; + String[] cfgs; if (cfgStr.contains(",")) { cfgs = cfgStr.split(","); } else { @@ -1048,7 +1048,7 @@ public class Main { } for (String c : cfgs) { - String cp[]; + String[] cp; if (c.contains("=")) { cp = c.split("="); } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java index 134c8f57c..0f189f978 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -298,7 +298,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel @Override public int handle(Throwable thrown) { synchronized (MainFrame.class) { - String options[] = new String[]{translate("button.abort"), translate("button.retry"), translate("button.ignore")}; + String[] options = new String[]{translate("button.abort"), translate("button.retry"), translate("button.ignore")}; return View.showOptionDialog(null, translate("error.occured").replace("%error%", thrown.getLocalizedMessage()), translate("error"), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, options, ""); } } @@ -901,7 +901,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel files = exportSelection(errorHandler, tempDir, export); files.clear(); - File fs[] = ftemp.listFiles(); + File[] fs = ftemp.listFiles(); for (File f : fs) { files.add(f); } @@ -1116,7 +1116,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel final JPanel fontPanel = new JPanel(); final JPanel fontParams2 = new JPanel(); fontParams2.setLayout(null); - final Component ctable[][] = new Component[][]{ + final Component[][] ctable = new Component[][]{ {new JLabel(translate("font.name")), fontNameLabel = new JLabel(translate("value.unknown"))}, {new JLabel(translate("font.isbold")), fontIsBoldLabel = new JLabel(translate("value.unknown"))}, {new JLabel(translate("font.isitalic")), fontIsItalicLabel = new JLabel(translate("value.unknown"))}, @@ -1133,7 +1133,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel final int borderLeft = 10; - final int maxws[] = new int[ctable[0].length]; + final int[] maxws = new int[ctable[0].length]; for (int x = 0; x < ctable[0].length; x++) { int maxw = 0; for (int y = 0; y < ctable.length; y++) { @@ -1778,7 +1778,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel public List getSelectedNodes() { List ret = new ArrayList<>(); - TreePath tps[] = tagTree.getSelectionPaths(); + TreePath[] tps = tagTree.getSelectionPaths(); if (tps == null) { return ret; } @@ -1938,7 +1938,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel public List getSelected(JTree tree) { TreeSelectionModel tsm = tree.getSelectionModel(); - TreePath tps[] = tsm.getSelectionPaths(); + TreePath[] tps = tsm.getSelectionPaths(); List ret = new ArrayList<>(); if (tps == null) { return ret; @@ -1964,7 +1964,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel public List getAllSelected(JTree tree) { TreeSelectionModel tsm = tree.getSelectionModel(); - TreePath tps[] = tsm.getSelectionPaths(); + TreePath[] tps = tsm.getSelectionPaths(); List ret = new ArrayList<>(); if (tps == null) { return ret; @@ -2438,7 +2438,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel if (returnVal == JFileChooser.APPROVE_OPTION) { Configuration.setConfig("lastOpenDir", Helper.fixDialogFile(fc.getSelectedFile()).getParentFile().getAbsolutePath()); File selfile = Helper.fixDialogFile(fc.getSelectedFile()); - byte data[] = Helper.readFile(selfile.getAbsolutePath()); + byte[] data = Helper.readFile(selfile.getAbsolutePath()); try { it.setImage(data); swf.clearImageCache(); @@ -3315,7 +3315,7 @@ public class MainFrame extends AppRibbonFrame implements ActionListener, TreeSel }//not showframe sos2.writeTag(new EndTag(null)); - byte data[] = baos.toByteArray(); + byte[] data = baos.toByteArray(); sos.writeUI32(sos.getPos() + data.length + 4); sos.write(data); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java index 5a784bba5..2fe827449 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/SelectLanguageDialog.java @@ -39,7 +39,7 @@ public class SelectLanguageDialog extends AppDialog implements ActionListener { JComboBox languageCombobox = new JComboBox<>(); public String languageCode = null; - private String languages[] = new String[]{"en", "cs", "zh", "de", "es", "hu", "nl", "pt", "ru", "sv", "uk"}; + private String[] languages = new String[]{"en", "cs", "zh", "de", "es", "hu", "nl", "pt", "ru", "sv", "uk"}; public SelectLanguageDialog() { setSize(350, 130); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/View.java b/trunk/src/com/jpexs/decompiler/flash/gui/View.java index bee71c9be..a6c616ff1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/View.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/View.java @@ -227,7 +227,7 @@ public class View { } public static int showOptionDialog(final Component parentComponent, final Object message, final String title, final int optionType, final int messageType, final Icon icon, final Object[] options, final Object initialValue) { - final int ret[] = new int[1]; + final int[] ret = new int[1]; execInEventDispatch(new Runnable() { @Override public void run() { @@ -271,7 +271,7 @@ public class View { } public static String showInputDialog(final Object message, final Object initialSelection) { - final String ret[] = new String[1]; + final String[] ret = new String[1]; execInEventDispatch(new Runnable() { @Override public void run() { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java index 2b183ae35..5afd813cb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ClassesListTree.java @@ -65,7 +65,7 @@ public class ClassesListTree extends JTree implements TreeSelectionListener { public List getSelectedScripts() { TreeSelectionModel tsm = getSelectionModel(); final List selectedScripts = new ArrayList<>(); - TreePath tps[] = tsm.getSelectionPaths(); + TreePath[] tps = tsm.getSelectionPaths(); if (tps == null) { return selectedScripts; } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodBodyParamsPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodBodyParamsPanel.java index 7ffc95762..ca096d6f7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodBodyParamsPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/MethodBodyParamsPanel.java @@ -50,7 +50,7 @@ public class MethodBodyParamsPanel extends JPanel implements ChangeListener { setLayout(null); this.abcPanel = abcPanel; - JComponent cmps[][] = new JComponent[][]{ + JComponent[][] cmps = new JComponent[][]{ {maxStackLabel = new JLabel(translate("abc.detail.body.params.maxstack"), SwingConstants.RIGHT), maxStackField = new MyFormattedTextField(NumberFormat.getNumberInstance())}, {localCountLabel = new JLabel(translate("abc.detail.body.params.localregcount"), SwingConstants.RIGHT), localCountField = new MyFormattedTextField(NumberFormat.getNumberInstance())}, {initScopeDepthLabel = new JLabel(translate("abc.detail.body.params.minscope"), SwingConstants.RIGHT), initScopeDepthField = new MyFormattedTextField(NumberFormat.getNumberInstance())}, diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java index 383bf02e2..f988de3fb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DecimalTableModel.java @@ -23,8 +23,8 @@ import javax.swing.table.TableModel; public class DecimalTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "Value"}; - private static final Class classes[] = new Class[]{Long.class, String.class}; + private static final String[] columnNames = new String[]{"Index", "Value"}; + private static final Class[] classes = new Class[]{Long.class, String.class}; public DecimalTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java index 84c52d0cf..df662fb57 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/DoubleTableModel.java @@ -23,8 +23,8 @@ import javax.swing.table.TableModel; public class DoubleTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "Value"}; - private static final Class classes[] = new Class[]{Long.class, String.class}; + private static final String[] columnNames = new String[]{"Index", "Value"}; + private static final Class[] classes = new Class[]{Long.class, String.class}; public DoubleTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java index 5c9523493..98d52464c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/IntTableModel.java @@ -23,8 +23,8 @@ import javax.swing.table.TableModel; public class IntTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "Value"}; - private static final Class classes[] = new Class[]{Long.class, Long.class}; + private static final String[] columnNames = new String[]{"Index", "Value"}; + private static final Class[] classes = new Class[]{Long.class, Long.class}; public IntTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java index 2019cc68a..a76f4d8c8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/MultinameTableModel.java @@ -24,8 +24,8 @@ import javax.swing.table.TableModel; public class MultinameTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "Kind", "Name", "Namespace", "NamespaceSet"}; - private static final Class classes[] = new Class[]{Long.class, String.class, String.class, String.class, String.class}; + private static final String[] columnNames = new String[]{"Index", "Kind", "Name", "Namespace", "NamespaceSet"}; + private static final Class[] classes = new Class[]{Long.class, String.class, String.class, String.class, String.class}; public MultinameTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java index 3d0e64373..d93910fbb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceSetTableModel.java @@ -23,8 +23,8 @@ import javax.swing.table.TableModel; public class NamespaceSetTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "NameSpaces"}; - private static final Class classes[] = new Class[]{Long.class, String.class, String.class}; + private static final String[] columnNames = new String[]{"Index", "NameSpaces"}; + private static final Class[] classes = new Class[]{Long.class, String.class, String.class}; public NamespaceSetTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java index 20e0eae33..4012da80e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/NamespaceTableModel.java @@ -23,8 +23,8 @@ import javax.swing.table.TableModel; public class NamespaceTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "Kind", "Name"}; - private static final Class classes[] = new Class[]{Long.class, String.class, String.class}; + private static final String[] columnNames = new String[]{"Index", "Kind", "Name"}; + private static final Class[] classes = new Class[]{Long.class, String.class, String.class}; public NamespaceTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java index e71289607..0a2533572 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/StringTableModel.java @@ -23,8 +23,8 @@ import javax.swing.table.TableModel; public class StringTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "Value"}; - private static final Class classes[] = new Class[]{Long.class, String.class}; + private static final String[] columnNames = new String[]{"Index", "Value"}; + private static final Class[] classes = new Class[]{Long.class, String.class}; public StringTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java index 9f0438955..54a8c885e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/tablemodels/UIntTableModel.java @@ -23,8 +23,8 @@ import javax.swing.table.TableModel; public class UIntTableModel implements TableModel { private ABC abc; - private static final String columnNames[] = new String[]{"Index", "Value"}; - private static final Class classes[] = new Class[]{Long.class, Long.class}; + private static final String[] columnNames = new String[]{"Index", "Value"}; + private static final Class[] classes = new Class[]{Long.class, Long.class}; public UIntTableModel(ABC abc) { this.abc = abc; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java index 0f28464c6..ffe325c8c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/player/FlashPlayerPanel.java @@ -227,7 +227,7 @@ public class FlashPlayerPanel extends Panel implements FlashDisplay { public boolean isPlaying() { IntByReference ibr = new IntByReference(); Kernel32.INSTANCE.WriteFile(pipe, new byte[]{CMD_PLAYING}, 1, ibr, null); - byte res[] = new byte[1]; + byte[] res = new byte[1]; if (Kernel32.INSTANCE.ReadFile(pipe, res, res.length, ibr, null)) { return res[0] == 1; } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java index 9fd58902b..2fd00569b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java @@ -346,7 +346,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe } if (!listModel.contains(url)) { try { - byte hdr[] = new byte[3]; + byte[] hdr = new byte[3]; data.read(hdr); String shdr = new String(hdr); if ((swfOnly) && ((!shdr.equals("FWS")) && (!shdr.equals("CWS")))) { @@ -356,7 +356,7 @@ public class ProxyFrame extends AppFrame implements ActionListener, CatchedListe File f = new File(Main.tempFile(url)); try (FileOutputStream fos = new FileOutputStream(f)) { fos.write(hdr); - byte buf[] = new byte[2048]; + byte[] buf = new byte[2048]; int count; while ((count = data.read(buf)) > 0) { fos.write(buf, 0, count); diff --git a/trunk/src/com/jpexs/decompiler/flash/helpers/Highlighting.java b/trunk/src/com/jpexs/decompiler/flash/helpers/Highlighting.java index 6995836a0..2709ecb48 100644 --- a/trunk/src/com/jpexs/decompiler/flash/helpers/Highlighting.java +++ b/trunk/src/com/jpexs/decompiler/flash/helpers/Highlighting.java @@ -228,7 +228,7 @@ public class Highlighting implements Serializable { private static List getSpecificHighlights(String texts, String txtOpen, String txtClose, String txtEnd) { List ret = new ArrayList<>(); - StringBuffer text = new StringBuffer(texts); + StringBuilder text = new StringBuilder(texts); int pos = 0; while (true) { int openpos = text.indexOf(txtOpen); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java index 305fb6101..f09d62c78 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java @@ -71,7 +71,7 @@ public class CSMTextSettingsTag extends Tag { * @param pos * @throws IOException */ - public CSMTextSettingsTag(SWF swf, byte data[], int version, long pos) throws IOException { + public CSMTextSettingsTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "CSMTextSettings", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); textID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java index a52c9a663..01dc785c5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java @@ -31,7 +31,7 @@ import java.io.OutputStream; */ public class DebugIDTag extends Tag { - public byte debugId[]; + public byte[] debugId; public static final int ID = 63; /** @@ -60,7 +60,7 @@ public class DebugIDTag extends Tag { * @param version SWF version * @throws IOException */ - public DebugIDTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DebugIDTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DebugID", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); debugId = sis.readBytes(16); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java index 662c759ca..9bb129d3e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java @@ -28,7 +28,7 @@ import java.io.OutputStream; public class DefineBinaryDataTag extends CharacterTag { public int tag; - public byte binaryData[]; + public byte[] binaryData; public long reserved; public static final int ID = 87; @@ -52,7 +52,7 @@ public class DefineBinaryDataTag extends CharacterTag { return baos.toByteArray(); } - public DefineBinaryDataTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineBinaryDataTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineBinaryData", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); tag = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java index 36116777f..7c99c5357 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java @@ -54,7 +54,7 @@ public class DefineBitsJPEG2Tag extends ImageTag implements AloneTag { return null; } - public DefineBitsJPEG2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineBitsJPEG2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineBitsJPEG2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); @@ -62,7 +62,7 @@ public class DefineBitsJPEG2Tag extends ImageTag implements AloneTag { } @Override - public void setImage(byte data[]) { + public void setImage(byte[] data) { imageData = data; } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java index 6b531dae1..af09bee6e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java @@ -35,8 +35,8 @@ import javax.imageio.ImageIO; public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { public int characterID; - public byte imageData[]; - public byte bitmapAlphaData[]; + public byte[] imageData; + public byte[] bitmapAlphaData; public static final int ID = 35; @Override @@ -45,11 +45,11 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { } @Override - public void setImage(byte data[]) { + public void setImage(byte[] data) { imageData = data; if (ImageTag.getImageFormat(data).equals("jpg")) { BufferedImage image = getImage(new ArrayList()); - byte ba[] = new byte[image.getWidth() * image.getHeight()]; + byte[] ba = new byte[image.getWidth() * image.getHeight()]; for (int i = 0; i < ba.length; i++) { ba[i] = (byte) 255; } @@ -90,7 +90,7 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { return null; } - public DefineBitsJPEG3Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineBitsJPEG3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineBitsJPEG3", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java index ea8a4a6a1..2518902d4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java @@ -41,8 +41,8 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { public int characterID; public int deblockParam; - public byte imageData[]; - public byte bitmapAlphaData[]; + public byte[] imageData; + public byte[] bitmapAlphaData; public static final int ID = 90; @Override @@ -60,11 +60,11 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { } @Override - public void setImage(byte data[]) { + public void setImage(byte[] data) { imageData = data; if (ImageTag.getImageFormat(data).equals("jpg")) { BufferedImage image = getImage(new ArrayList()); - byte ba[] = new byte[image.getWidth() * image.getHeight()]; + byte[] ba = new byte[image.getWidth() * image.getHeight()]; for (int i = 0; i < ba.length; i++) { ba[i] = (byte) 255; } @@ -127,7 +127,7 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { * @param pos * @throws IOException */ - public DefineBitsJPEG4Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineBitsJPEG4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineBitsJPEG4", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java index 81eb180d6..9e28054bd 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java @@ -41,7 +41,7 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { public int bitmapWidth; public int bitmapHeight; public int bitmapColorTableSize; - public byte zlibBitmapData[]; //TODO: Parse ALPHACOLORMAPDATA,ALPHABITMAPDATA + public byte[] zlibBitmapData; //TODO: Parse ALPHACOLORMAPDATA,ALPHABITMAPDATA public static final int FORMAT_8BIT_COLORMAPPED = 3; public static final int FORMAT_32BIT_ARGB = 5; public static final int ID = 36; @@ -52,7 +52,7 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { } @Override - public void setImage(byte data[]) throws IOException { + public void setImage(byte[] data) throws IOException { BufferedImage image = ImageIO.read(new ByteArrayInputStream(data)); ALPHABITMAPDATA bitmapData = new ALPHABITMAPDATA(); bitmapFormat = DefineBitsLosslessTag.FORMAT_24BIT_RGB; @@ -90,7 +90,7 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { decompressed = false; } - public DefineBitsLossless2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineBitsLossless2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineBitsLossless2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java index 0728840d9..9856da2f8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java @@ -43,7 +43,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { public int bitmapWidth; public int bitmapHeight; public int bitmapColorTableSize; - public byte zlibBitmapData[]; //TODO: Parse COLORMAPDATA,BITMAPDATA + public byte[] zlibBitmapData; //TODO: Parse COLORMAPDATA,BITMAPDATA public static final int FORMAT_8BIT_COLORMAPPED = 3; public static final int FORMAT_15BIT_RGB = 4; public static final int FORMAT_24BIT_RGB = 5; @@ -53,7 +53,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { public static final int ID = 20; @Override - public void setImage(byte data[]) throws IOException { + public void setImage(byte[] data) throws IOException { BufferedImage image = ImageIO.read(new ByteArrayInputStream(data)); bitmapFormat = FORMAT_24BIT_RGB; bitmapWidth = image.getWidth(); @@ -155,7 +155,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { decompressed = true; } - public DefineBitsLosslessTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineBitsLosslessTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineBitsLossless", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java index d8a598eb0..15b0426e9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java @@ -31,12 +31,12 @@ import javax.imageio.ImageIO; public class DefineBitsTag extends ImageTag { public int characterID; - public byte jpegData[]; + public byte[] jpegData; private JPEGTablesTag jtt = null; public static final int ID = 6; @Override - public void setImage(byte data[]) { + public void setImage(byte[] data) { throw new UnsupportedOperationException("Set image is not supported for DefineBits"); } @@ -45,7 +45,7 @@ public class DefineBitsTag extends ImageTag { return false; } - public DefineBitsTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineBitsTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineBits", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); @@ -68,7 +68,7 @@ public class DefineBitsTag extends ImageTag { getJPEGTables(tags); if ((jtt != null)) { try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { - byte jttdata[] = jtt.getData(10); + byte[] jttdata = jtt.getData(10); if (jttdata.length != 0) { baos.write(jttdata, SWF.hasErrorHeader(jttdata) ? 4 : 0, jttdata.length - (SWF.hasErrorHeader(jttdata) ? 6 : 2)); baos.write(jpegData, SWF.hasErrorHeader(jpegData) ? 6 : 2, jpegData.length - (SWF.hasErrorHeader(jttdata) ? 6 : 2)); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java index bb7d31ef9..b6e210000 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java @@ -92,7 +92,7 @@ public class DefineButton2Tag extends CharacterTag implements Container, Bounded * @param pos * @throws IOException */ - public DefineButton2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineButton2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineButton2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); buttonId = sis.readUI16(); @@ -132,7 +132,7 @@ public class DefineButton2Tag extends CharacterTag implements Container, Bounded ByteArrayOutputStream baos2 = new ByteArrayOutputStream(); OutputStream os2 = baos2; - byte origbrdata[] = null; + byte[] origbrdata = null; if (Configuration.DEBUG_COPY) { SWFInputStream sis = new SWFInputStream(bais, version); int len = sis.readUI16(); @@ -144,7 +144,7 @@ public class DefineButton2Tag extends CharacterTag implements Container, Bounded try (SWFOutputStream sos2 = new SWFOutputStream(os2, version)) { sos2.writeBUTTONRECORDList(characters, true); } - byte brdata[] = baos2.toByteArray(); + byte[] brdata = baos2.toByteArray(); if (Configuration.DEBUG_COPY) { if (origbrdata != null) { if (origbrdata.length != brdata.length) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java index e3731c138..63d65f121 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java @@ -62,7 +62,7 @@ public class DefineButtonCxformTag extends Tag { * @param version SWF version * @throws IOException */ - public DefineButtonCxformTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineButtonCxformTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineButtonCxform", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); buttonId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java index 7c77f4413..af4010d08 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java @@ -90,7 +90,7 @@ public class DefineButtonSoundTag extends CharacterTag { * @param version SWF version * @throws IOException */ - public DefineButtonSoundTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineButtonSoundTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineButtonSound", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); buttonId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index c864e896a..706bb7fad 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java @@ -91,7 +91,7 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT * @param pos * @throws IOException */ - public DefineButtonTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineButtonTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineButton", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); buttonId = sis.readUI16(); @@ -165,7 +165,7 @@ public class DefineButtonTag extends CharacterTag implements ASMSource, BoundedT ByteArrayOutputStream baos = new ByteArrayOutputStream(); int prevLength = 0; if (previousTag != null) { - byte prevData[] = previousTag.getData(version); + byte[] prevData = previousTag.getData(version); baos.write(prevData); prevLength = prevData.length; } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java index fe82f4763..2e24adb5c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java @@ -475,7 +475,7 @@ public class DefineEditTextTag extends TextTag { * @param pos * @throws IOException */ - public DefineEditTextTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineEditTextTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineEditText", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index 5112199b4..e8f1d0af8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -59,7 +59,7 @@ public class DefineFont2Tag extends FontTag { public int fontLeading; public List fontAdvanceTable; public List fontBoundsTable; - public KERNINGRECORD fontKerningTable[]; + public KERNINGRECORD[] fontKerningTable; public static final int ID = 48; @Override @@ -114,7 +114,7 @@ public class DefineFont2Tag extends FontTag { offsetTable.add((glyphShapeTable.size() + 1/*CodeTableOffset*/) * (fontFlagsWideOffsets ? 4 : 2) + sos3.getPos()); sos3.writeSHAPE(glyphShapeTable.get(i), 1); } - byte baGlyphShapes[] = baosGlyphShapes.toByteArray(); + byte[] baGlyphShapes = baosGlyphShapes.toByteArray(); for (Long offset : offsetTable) { if (fontFlagsWideOffsets) { sos.writeUI32(offset); @@ -170,7 +170,7 @@ public class DefineFont2Tag extends FontTag { * @param pos * @throws IOException */ - public DefineFont2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFont2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFont2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index 31e517e7a..84ea9eec7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -50,7 +50,7 @@ public class DefineFont3Tag extends FontTag { public LANGCODE languageCode; public String fontName; public int numGlyphs; - //public long offsetTable[]; + //public long[] offsetTable]; public List glyphShapeTable; public List codeTable; public int fontAscent; @@ -58,7 +58,7 @@ public class DefineFont3Tag extends FontTag { public int fontLeading; public List fontAdvanceTable; public List fontBoundsTable; - public KERNINGRECORD fontKerningTable[]; + public KERNINGRECORD[] fontKerningTable; public static final int ID = 75; @Override @@ -90,7 +90,7 @@ public class DefineFont3Tag extends FontTag { return codeTable.indexOf((Integer) (int) c); } - public DefineFont3Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFont3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFont3", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontId = sis.readUI16(); @@ -189,7 +189,7 @@ public class DefineFont3Tag extends FontTag { offsetTable.add((glyphShapeTable.size() + 1/*CodeTableOffset*/) * (fontFlagsWideOffsets ? 4 : 2) + sos3.getPos()); sos3.writeSHAPE(glyphShapeTable.get(i), 1); } - byte baGlyphShapes[] = baosGlyphShapes.toByteArray(); + byte[] baGlyphShapes = baosGlyphShapes.toByteArray(); for (Long offset : offsetTable) { if (fontFlagsWideOffsets) { sos.writeUI32(offset); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java index 1065ecb81..207dc1200 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java @@ -32,7 +32,7 @@ public class DefineFont4Tag extends CharacterTag { public boolean fontFlagsItalic; public boolean fontFlagsBold; public String fontName; - public byte fontData[]; + public byte[] fontData; public static final int ID = 91; @Override @@ -40,7 +40,7 @@ public class DefineFont4Tag extends CharacterTag { return fontID; } - public DefineFont4Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFont4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFont4", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java index 3aeb5b0b0..b7e37595d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java @@ -34,7 +34,7 @@ public class DefineFontAlignZonesTag extends Tag { public List zoneTable; public static final int ID = 73; - public DefineFontAlignZonesTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFontAlignZonesTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFontAlignZones", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index dfc2a22ae..7ee5dcc9e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -84,7 +84,7 @@ public class DefineFontInfo2Tag extends Tag { * @param version SWF version * @throws IOException */ - public DefineFontInfo2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFontInfo2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFontInfo2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java index 490deed8c..6a54904a3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java @@ -86,7 +86,7 @@ public class DefineFontInfoTag extends Tag { * @param pos * @throws IOException */ - public DefineFontInfoTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFontInfoTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFontInfo", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java index 0013678d4..6822df27b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java @@ -28,7 +28,7 @@ public class DefineFontNameTag extends Tag { public String fontCopyright; public static final int ID = 88; - public DefineFontNameTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFontNameTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFontName", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java index d24e9a76c..f621cd781 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java @@ -138,7 +138,7 @@ public class DefineFontTag extends FontTag { * @param pos * @throws IOException */ - public DefineFontTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineFontTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineFont", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); fontId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java index 8af42ead0..934b1a749 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java @@ -117,7 +117,7 @@ public class DefineMorphShape2Tag extends CharacterTag implements BoundedTag, Mo sos2.writeMORPHFILLSTYLEARRAY(morphFillStyles, 2); sos2.writeMORPHLINESTYLEARRAY(morphLineStyles, 2); sos2.writeSHAPE(startEdges, 1); - byte ba2[] = baos2.toByteArray(); + byte[] ba2 = baos2.toByteArray(); sos.writeUI32(ba2.length); sos.write(ba2); sos.writeSHAPE(endEdges, 1); @@ -134,7 +134,7 @@ public class DefineMorphShape2Tag extends CharacterTag implements BoundedTag, Mo * @param pos * @throws IOException */ - public DefineMorphShape2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineMorphShape2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineMorphShape2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java index e63dfaf96..e3003df9e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java @@ -98,7 +98,7 @@ public class DefineMorphShapeTag extends CharacterTag implements BoundedTag, Mor sos2.writeMORPHFILLSTYLEARRAY(morphFillStyles, 1); sos2.writeMORPHLINESTYLEARRAY(morphLineStyles, 1); sos2.writeSHAPE(startEdges, 1); - byte d[] = baos2.toByteArray(); + byte[] d = baos2.toByteArray(); sos.writeUI32(d.length); sos.write(d); sos.writeSHAPE(endEdges, 1); @@ -116,7 +116,7 @@ public class DefineMorphShapeTag extends CharacterTag implements BoundedTag, Mor * @param pos * @throws IOException */ - public DefineMorphShapeTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineMorphShapeTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineMorphShape", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java index 6783bfac2..23f4090a6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java @@ -34,7 +34,7 @@ public class DefineScalingGridTag extends Tag { private RECT splitter; public static final int ID = 78; - public DefineScalingGridTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineScalingGridTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineScalingGrid", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java index 99324574f..8f240029f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java @@ -31,10 +31,10 @@ import java.io.OutputStream; */ public class DefineSceneAndFrameLabelDataTag extends Tag { - public long sceneOffsets[]; - public String sceneNames[]; - public long frameNums[]; - public String frameNames[]; + public long[] sceneOffsets; + public String[] sceneNames; + public long[] frameNums; + public String[] frameNames; public static final int ID = 86; /** @@ -73,7 +73,7 @@ public class DefineSceneAndFrameLabelDataTag extends Tag { * @param version SWF version * @throws IOException */ - public DefineSceneAndFrameLabelDataTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineSceneAndFrameLabelDataTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineSceneAndFrameLabelData", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); int sceneCount = (int) sis.readEncodedU32(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java index ae3c34af2..ffda03538 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java @@ -81,7 +81,7 @@ public class DefineShape2Tag extends CharacterTag implements BoundedTag, ShapeTa return shapeBounds; } - public DefineShape2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineShape2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineShape2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); shapeId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java index 5dacff3cc..4a98e6e03 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java @@ -81,7 +81,7 @@ public class DefineShape3Tag extends CharacterTag implements BoundedTag, ShapeTa return shapeId; } - public DefineShape3Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineShape3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineShape3", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); shapeId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java index d10de0e9f..45345223d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java @@ -85,7 +85,7 @@ public class DefineShape4Tag extends CharacterTag implements BoundedTag, ShapeTa return shapeBounds; } - public DefineShape4Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineShape4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineShape4", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); shapeId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java index bb5598368..8f14be382 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java @@ -61,7 +61,7 @@ public class DefineShapeTag extends CharacterTag implements BoundedTag, ShapeTag return shapeBounds; } - public DefineShapeTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineShapeTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineShape", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); shapeId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java index b54f50d27..6c5bbe4ec 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java @@ -46,7 +46,7 @@ public class DefineSoundTag extends CharacterTag { public int soundSize; public int soundType; public long soundSampleCount; - public byte soundData[]; + public byte[] soundData; public static final int ID = 14; @Override @@ -85,7 +85,7 @@ public class DefineSoundTag extends CharacterTag { * @param version SWF version * @throws IOException */ - public DefineSoundTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineSoundTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineSound", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); soundId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index 36afab4fd..c9cb4ec97 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -192,7 +192,7 @@ public class DefineSpriteTag extends CharacterTag implements Container, BoundedT * @param skipUnusualTags * @throws IOException */ - public DefineSpriteTag(SWF swf, byte data[], int version, int level, long pos, boolean parallel, boolean skipUnusualTags) throws IOException { + public DefineSpriteTag(SWF swf, byte[] data, int version, int level, long pos, boolean parallel, boolean skipUnusualTags) throws IOException { super(swf, ID, "DefineSprite", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version, pos); spriteId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java index f1a8af380..533a2686d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java @@ -439,7 +439,7 @@ public class DefineText2Tag extends TextTag implements DrawableTag { * @param pos * @throws IOException */ - public DefineText2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineText2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineText2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java index 1bac0e4f2..3fa21cb56 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java @@ -443,7 +443,7 @@ public class DefineTextTag extends TextTag implements DrawableTag { * @param pos * @throws IOException */ - public DefineTextTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineTextTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineText", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java index d379faa36..c79fbd8e5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java @@ -86,7 +86,7 @@ public class DefineVideoStreamTag extends CharacterTag implements BoundedTag { * @param version SWF version * @throws IOException */ - public DefineVideoStreamTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DefineVideoStreamTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DefineVideoStream", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java index b1c812a94..adc6a9e4c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java @@ -65,7 +65,7 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag { * @param pos * @throws IOException */ - public DoABCDefineTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DoABCDefineTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DoABCDefine", data, pos); InputStream is = new ByteArrayInputStream(data); SWFInputStream sis = new SWFInputStream(is, version); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java index 121724a08..9a991f8f3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoABCTag.java @@ -54,7 +54,7 @@ public class DoABCTag extends Tag implements ABCContainerTag { * @param pos * @throws IOException */ - public DoABCTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DoABCTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DoABC", data, pos); InputStream is = new ByteArrayInputStream(data); abc = new ABC(is); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java index bfe827c57..3ea80fd4f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoActionTag.java @@ -53,7 +53,7 @@ public class DoActionTag extends Tag implements ASMSource { * @param version SWF version * @param pos */ - public DoActionTag(SWF swf, byte data[], int version, long pos) { + public DoActionTag(SWF swf, byte[] data, int version, long pos) { super(swf, ID, "DoAction", data, pos); actionBytes = data; } @@ -109,10 +109,10 @@ public class DoActionTag extends Tag implements ASMSource { ByteArrayOutputStream baos = new ByteArrayOutputStream(); int prevLength = 0; if (previousTag != null) { - byte prevData[] = previousTag.getData(version); + byte[] prevData = previousTag.getData(version); baos.write(prevData); prevLength = prevData.length; - byte header[] = SWFOutputStream.getTagHeader(this, data, version); + byte[] header = SWFOutputStream.getTagHeader(this, data, version); baos.write(header); prevLength += header.length; } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index ffa85fbc0..3c21d3188 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -57,7 +57,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { * @param pos * @throws IOException */ - public DoInitActionTag(SWF swf, byte data[], int version, long pos) throws IOException { + public DoInitActionTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "DoInitAction", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); spriteId = sis.readUI16(); @@ -115,13 +115,13 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { ByteArrayOutputStream baos = new ByteArrayOutputStream(); int prevLength = 0; if (previousTag != null) { - byte prevData[] = previousTag.getData(version); + byte[] prevData = previousTag.getData(version); baos.write(prevData); prevLength = prevData.length; baos.write(0); baos.write(0); prevLength += 2; - byte header[] = SWFOutputStream.getTagHeader(this, data, version); + byte[] header = SWFOutputStream.getTagHeader(this, data, version); baos.write(header); prevLength += header.length; } @@ -173,7 +173,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { if ((expName == null) || expName.equals("")) { return super.toString(); } - String pathParts[]; + String[] pathParts; if (expName.contains(".")) { pathParts = expName.split("\\."); } else { @@ -188,7 +188,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { if ((expName == null) || expName.equals("")) { return super.toString(); } - String pathParts[]; + String[] pathParts; if (expName.contains(".")) { pathParts = expName.split("\\."); } else { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java index b06f672d3..59df58e3b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java @@ -65,7 +65,7 @@ public class EnableDebugger2Tag extends Tag { * @param version SWF version * @throws IOException */ - public EnableDebugger2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public EnableDebugger2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "EnableDebugger2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); reserved = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java index 2d69a8250..b754e4cfc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java @@ -64,7 +64,7 @@ public class EnableDebuggerTag extends Tag { * @param version SWF version * @throws IOException */ - public EnableDebuggerTag(SWF swf, byte data[], int version, long pos) throws IOException { + public EnableDebuggerTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "EnableDebugger", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); passwordHash = sis.readString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java index 032c313f2..107234638 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java @@ -33,7 +33,7 @@ public class EnableTelemetryTag extends Tag { public static final int ID = 93; public int reserved; - public byte passwordHash[]; + public byte[] passwordHash; /** * Gets data bytes @@ -65,7 +65,7 @@ public class EnableTelemetryTag extends Tag { * @param pos * @throws IOException */ - public EnableTelemetryTag(SWF swf, byte data[], int version, long pos) throws IOException { + public EnableTelemetryTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); reserved = (int) sis.readUB(16); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java index 3ea0ac067..61cc5b09f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/EndTag.java @@ -47,7 +47,7 @@ public class EndTag extends Tag { * @param pos * @throws IOException */ - public EndTag(SWF swf, byte data[], int version, long pos) throws IOException { + public EndTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "End", data, pos); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java index d5d54604e..de8b64d89 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java @@ -53,7 +53,7 @@ public class ExportAssetsTag extends Tag { * @param version SWF version * @throws IOException */ - public ExportAssetsTag(SWF swf, byte data[], int version, long pos) throws IOException { + public ExportAssetsTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "ExportAssets", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); int count = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java index ff5014752..ae62c7c45 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java @@ -41,7 +41,7 @@ public class FileAttributesTag extends Tag { super(null, ID, "FileAttributes", new byte[]{}, 0); } - public FileAttributesTag(SWF swf, byte data[], int version, long pos) throws IOException { + public FileAttributesTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "FileAttributes", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); reserved1 = (int) sis.readUB(1); // reserved diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java index 931c9e803..be397decf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java @@ -38,7 +38,7 @@ public class FrameLabelTag extends Tag { return namedAnchor; } - public FrameLabelTag(SWF swf, byte data[], int version, long pos) throws IOException { + public FrameLabelTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "FrameLabel", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); name = sis.readString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java index 671787c0c..d9435d6ae 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java @@ -47,7 +47,7 @@ public class ImportAssets2Tag extends Tag implements ImportTag { * @param version SWF version * @throws IOException */ - public ImportAssets2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public ImportAssets2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "ImportAssets2", data, pos); assets = new HashMap<>(); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java index 55b1a3e8d..eac00c380 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java @@ -47,7 +47,7 @@ public class ImportAssetsTag extends Tag implements ImportTag { * @param version SWF version * @throws IOException */ - public ImportAssetsTag(SWF swf, byte data[], int version, long pos) throws IOException { + public ImportAssetsTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "ImportAssets", data, pos); assets = new HashMap<>(); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java index a8a536f71..664822c59 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java @@ -23,7 +23,7 @@ public class JPEGTablesTag extends Tag { public static final int ID = 8; - public JPEGTablesTag(SWF swf, byte data[], long pos) throws IOException { + public JPEGTablesTag(SWF swf, byte[] data, long pos) throws IOException { super(swf, ID, "JPEGTables", data, pos); //data is JPEG data } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java index 6d090d890..272c3aa79 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/MetadataTag.java @@ -29,7 +29,7 @@ public class MetadataTag extends Tag { public String xmlMetadata; public static final int ID = 77; - public MetadataTag(SWF swf, byte data[], int version, long pos) { + public MetadataTag(SWF swf, byte[] data, int version, long pos) { super(swf, ID, "Metadata", data, pos); try { SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java index 597013621..eff0597a7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java @@ -209,7 +209,7 @@ public class PlaceObject2Tag extends CharacterIdTag implements Container, PlaceO * @param pos * @throws IOException */ - public PlaceObject2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public PlaceObject2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "PlaceObject2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); placeFlagHasClipActions = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java index 96efb2bd2..171cb3123 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java @@ -281,7 +281,7 @@ public class PlaceObject3Tag extends CharacterIdTag implements Container, PlaceO * @param pos * @throws IOException */ - public PlaceObject3Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public PlaceObject3Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "PlaceObject3", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); placeFlagHasClipActions = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java index 5476e0ef2..c4ff203b7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java @@ -172,7 +172,7 @@ public class PlaceObject4Tag extends CharacterIdTag implements Container, PlaceO private boolean bitmapCacheBug; private int reserved; public static final int ID = 94; - public byte amfData[]; //TODO: Parse AMF data? + public byte[] amfData; //TODO: Parse AMF data? @Override public List getFilters() { @@ -282,7 +282,7 @@ public class PlaceObject4Tag extends CharacterIdTag implements Container, PlaceO * @param pos * @throws IOException */ - public PlaceObject4Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public PlaceObject4Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "PlaceObject4", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); placeFlagHasClipActions = sis.readUB(1) == 1; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java index d2551aa85..2e632b8f4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java @@ -102,7 +102,7 @@ public class PlaceObjectTag extends CharacterIdTag implements PlaceObjectTypeTag * @param pos * @throws IOException */ - public PlaceObjectTag(SWF swf, byte data[], int version, long pos) throws IOException { + public PlaceObjectTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "PlaceObject", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java index fc1ec02ad..12ccf0f10 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java @@ -32,7 +32,7 @@ public class ProductInfoTag extends Tag { public long compilationDate; public static final int ID = 41; - public ProductInfoTag(SWF swf, byte data[], int version, long pos) throws IOException { + public ProductInfoTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "ProductInfo", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); /* diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java index dd1c9f7e0..e21148aec 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ProtectTag.java @@ -64,7 +64,7 @@ public class ProtectTag extends Tag { * @param version SWF version * @throws IOException */ - public ProtectTag(SWF swf, byte data[], int version, long pos) throws IOException { + public ProtectTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "Protect", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); if (sis.available() > 0) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java index b97a7ba2b..bc4a4517f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java @@ -27,7 +27,7 @@ public class RemoveObject2Tag extends Tag implements RemoveTag { public int depth; public static final int ID = 28; - public RemoveObject2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public RemoveObject2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "RemoveObject2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); depth = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java index cbec3f6b1..e65d2f879 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java @@ -69,7 +69,7 @@ public class RemoveObjectTag extends CharacterIdTag implements RemoveTag { * @param version SWF version * @throws IOException */ - public RemoveObjectTag(SWF swf, byte data[], int version, long pos) throws IOException { + public RemoveObjectTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "RemoveObject", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); characterId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java index 6d42e6249..d1906f181 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java @@ -30,7 +30,7 @@ public class ScriptLimitsTag extends Tag { public int scriptTimeoutSeconds; public static final int ID = 65; - public ScriptLimitsTag(SWF swf, byte data[], int version, long pos) throws IOException { + public ScriptLimitsTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "ScriptLimits", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); maxRecursionDepth = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java index 171d8aa31..b20805806 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java @@ -29,7 +29,7 @@ public class SetBackgroundColorTag extends Tag { public RGB backgroundColor; public static final int ID = 9; - public SetBackgroundColorTag(SWF swf, byte data[], int version, long pos) throws IOException { + public SetBackgroundColorTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "SetBackgroundColor", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); backgroundColor = sis.readRGB(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java index 40cfdb5ce..336487d24 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java @@ -68,7 +68,7 @@ public class SetTabIndexTag extends Tag { * @param pos * @throws IOException */ - public SetTabIndexTag(SWF swf, byte data[], int version, long pos) throws IOException { + public SetTabIndexTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "SetTabIndex", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); depth = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java index 5dd7dd39e..fc7e8a1f9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java @@ -37,7 +37,7 @@ public class SoundStreamBlockTag extends Tag { * @param pos * @throws IOException */ - public SoundStreamBlockTag(SWF swf, byte data[], int version, long pos) throws IOException { + public SoundStreamBlockTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "SoundStreamBlock", data, pos); //all data is streamSoundData } } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java index 2e52badfb..9c81a7b8d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java @@ -108,7 +108,7 @@ public class SoundStreamHead2Tag extends CharacterTag implements SoundStreamHead * @param pos * @throws IOException */ - public SoundStreamHead2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public SoundStreamHead2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "SoundStreamHead2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); sis.readUB(4);//reserved diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java index 3a500d53c..45ef04930 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java @@ -107,7 +107,7 @@ public class SoundStreamHeadTag extends CharacterTag implements SoundStreamHeadT * @param version SWF version * @throws IOException */ - public SoundStreamHeadTag(SWF swf, byte data[], int version, long pos) throws IOException { + public SoundStreamHeadTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "SoundStreamHead", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); sis.readUB(4);//reserved diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java index 2ebf3508c..787a48869 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java @@ -61,7 +61,7 @@ public class StartSound2Tag extends Tag { * @param version SWF version * @throws IOException */ - public StartSound2Tag(SWF swf, byte data[], int version, long pos) throws IOException { + public StartSound2Tag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "StartSound2", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); soundClassName = sis.readString(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java index 4930846ec..f35e6a76d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java @@ -62,7 +62,7 @@ public class StartSoundTag extends Tag { * @param version SWF version * @throws IOException */ - public StartSoundTag(SWF swf, byte data[], int version, long pos) throws IOException { + public StartSoundTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "StartSound", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); soundId = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java index e25fa3bac..40fdb4196 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java @@ -26,11 +26,11 @@ import java.io.OutputStream; public class SymbolClassTag extends Tag { - public int tagIDs[]; - public String classNames[]; + public int[] tagIDs; + public String[] classNames; public static final int ID = 76; - public SymbolClassTag(SWF swf, byte data[], int version, long pos) throws IOException { + public SymbolClassTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "SymbolClass", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); int numSymbols = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java index 379fae19f..6669ab91c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -38,7 +38,7 @@ public class Tag implements NeedsCharacters, Exportable, ContainerItem { /** * Data in the tag */ - protected byte data[]; + protected byte[] data; /** * If true, then Tag is written to the stream as longer than 0x3f even if it * is not @@ -76,7 +76,7 @@ public class Tag implements NeedsCharacters, Exportable, ContainerItem { * @param data Bytes of data * @param pos */ - public Tag(SWF swf, int id, String name, byte data[], long pos) { + public Tag(SWF swf, int id, String name, byte[] data, long pos) { this.id = id; this.name = name; this.data = data; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java b/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java index b2a2e0e9b..59a20631a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/TagStub.java @@ -60,7 +60,7 @@ public class TagStub extends Tag { * @param pos * @throws IOException */ - public TagStub(SWF swf, byte data[], int version, long pos) throws IOException { + public TagStub(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java index 06742f373..fbe986365 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java @@ -63,7 +63,7 @@ public class VideoFrameTag extends Tag { * @param version SWF version * @throws IOException */ - public VideoFrameTag(SWF swf, byte data[], int version, long pos) throws IOException { + public VideoFrameTag(SWF swf, byte[] data, int version, long pos) throws IOException { super(swf, ID, "VideoFrame", data, pos); SWFInputStream sis = new SWFInputStream(new ByteArrayInputStream(data), version); streamID = sis.readUI16(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java b/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java index 2f1b88e46..9a29ffdca 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/base/ASMSource.java @@ -61,7 +61,7 @@ public interface ASMSource { public byte[] getActionBytes(); - public void setActionBytes(byte actionBytes[]); + public void setActionBytes(byte[] actionBytes); public long getPos(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java index 9f8ced1e6..9602f9d53 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/base/FontTag.java @@ -38,7 +38,7 @@ import java.util.List; */ public abstract class FontTag extends CharacterTag implements AloneTag { - public FontTag(SWF swf, int id, String name, byte data[], long pos) { + public FontTag(SWF swf, int id, String name, byte[] data, long pos) { super(swf, id, name, data, pos); } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java index 7ed65d1c4..197fb41a9 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java @@ -35,7 +35,7 @@ public abstract class ImageTag extends CharacterTag { public abstract BufferedImage getImage(List tags); - public abstract void setImage(byte data[]) throws IOException; + public abstract void setImage(byte[] data) throws IOException; public abstract String getImageFormat(); @@ -43,7 +43,7 @@ public abstract class ImageTag extends CharacterTag { return true; } - public static String getImageFormat(byte data[]) { + public static String getImageFormat(byte[] data) { if (SWF.hasErrorHeader(data)) { return "jpg"; } diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java b/trunk/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java index f1ba4683e..d25c826fb 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/font/CharacterRanges.java @@ -65,7 +65,7 @@ public class CharacterRanges { ret.add(i); } } - int retArr[] = new int[ret.size()]; + int[] retArr = new int[ret.size()]; for (int i = 0; i < ret.size(); i++) { retArr[i] = ret.get(i); } @@ -118,12 +118,12 @@ public class CharacterRanges { String s; try { while ((s = br.readLine()) != null) { - String parts[] = s.split(":"); + String[] parts = s.split(":"); Language lng = new Language(parts[0]); - String ranges[] = parts[1].split(","); + String[] ranges = parts[1].split(","); for (String r : ranges) { if (r.contains("-")) { - String fromTo[] = r.split("-"); + String[] fromTo = r.split("-"); lng.ranges.add(new Range(Integer.parseInt(fromTo[0], 16), Integer.parseInt(fromTo[1], 16))); } else { lng.ranges.add(new Range(Integer.parseInt(r, 16))); diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java index 0808d14d4..703cc17c2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ALPHABITMAPDATA.java @@ -23,5 +23,5 @@ package com.jpexs.decompiler.flash.types; */ public class ALPHABITMAPDATA { - public ARGB bitmapPixelData[] = new ARGB[0]; + public ARGB[] bitmapPixelData = new ARGB[0]; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java index 5dbb1c01c..7814122e2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ALPHACOLORMAPDATA.java @@ -23,6 +23,6 @@ package com.jpexs.decompiler.flash.types; */ public class ALPHACOLORMAPDATA { - public RGBA colorTableRGB[]; - public byte colorMapPixelData[]; + public RGBA[] colorTableRGB; + public byte[] colorMapPixelData; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java index e641d01d1..f80e02f81 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/BITMAPDATA.java @@ -23,6 +23,6 @@ package com.jpexs.decompiler.flash.types; */ public class BITMAPDATA { - public PIX15 bitmapPixelDataPix15[] = new PIX15[0]; - public PIX24 bitmapPixelDataPix24[] = new PIX24[0]; + public PIX15[] bitmapPixelDataPix15 = new PIX15[0]; + public PIX24[] bitmapPixelDataPix24 = new PIX24[0]; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java b/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java index 44538df36..4c99407a5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/COLORMAPDATA.java @@ -21,6 +21,6 @@ package com.jpexs.decompiler.flash.types; */ public class COLORMAPDATA { - public RGB colorTableRGB[]; - public byte colorMapPixelData[]; + public RGB[] colorTableRGB; + public byte[] colorMapPixelData; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java index ab341783e..96677217b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/FILLSTYLEARRAY.java @@ -26,7 +26,7 @@ import java.util.Set; */ public class FILLSTYLEARRAY implements NeedsCharacters { - public FILLSTYLE fillStyles[]; + public FILLSTYLE[] fillStyles; @Override public Set getNeededCharacters() { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java b/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java index d4c2d4e4c..2e60b6896 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/FOCALGRADIENT.java @@ -24,6 +24,6 @@ public class FOCALGRADIENT { public int spreadMode; public int interPolationMode; - public GRADRECORD gradientRecords[] = new GRADRECORD[0]; + public GRADRECORD[] gradientRecords = new GRADRECORD[0]; public float focalPoint; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java b/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java index 9ffd65db1..c5a8c0c7b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/GRADIENT.java @@ -38,5 +38,5 @@ public class GRADIENT { public static final int INTERPOLATION_LINEAR_RGB_MODE = 1; public static final int INTERPOLATION_RESERVED1 = 2; public static final int INTERPOLATION_RESERVED2 = 3; - public GRADRECORD gradientRecords[]; + public GRADRECORD[] gradientRecords; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java index 4a805035a..3ee172a62 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/LINESTYLEARRAY.java @@ -22,6 +22,6 @@ package com.jpexs.decompiler.flash.types; */ public class LINESTYLEARRAY { - public LINESTYLE lineStyles[] = new LINESTYLE[0]; - public LINESTYLE2 lineStyles2[] = new LINESTYLE2[0]; + public LINESTYLE[] lineStyles = new LINESTYLE[0]; + public LINESTYLE2[] lineStyles2 = new LINESTYLE2[0]; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java index 1a83cb9c8..440404541 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java @@ -26,7 +26,7 @@ import java.util.Set; */ public class MORPHFILLSTYLEARRAY implements NeedsCharacters { - public MORPHFILLSTYLE fillStyles[]; + public MORPHFILLSTYLE[] fillStyles; @Override public Set getNeededCharacters() { diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java index 62ba625cb..2a1fa90be 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java @@ -31,7 +31,7 @@ public class MORPHGRADIENT { */ public int interPolationMode; public int numGradients; - public MORPHGRADRECORD gradientRecords[]; + public MORPHGRADRECORD[] gradientRecords; public static RGBA morphColor(RGBA c1, RGBA c2, int ratio) { int r = (c1.red + (c2.red - c1.red) * ratio / 65535); diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java index 6a6ee08fb..6c69f1035 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHLINESTYLEARRAY.java @@ -22,8 +22,8 @@ package com.jpexs.decompiler.flash.types; */ public class MORPHLINESTYLEARRAY { - public MORPHLINESTYLE lineStyles[]; - public MORPHLINESTYLE2 lineStyles2[]; + public MORPHLINESTYLE[] lineStyles; + public MORPHLINESTYLE2[] lineStyles2; public LINESTYLEARRAY getLineStylesAt(int shapeNum, int ratio) { LINESTYLEARRAY ret = new LINESTYLEARRAY(); diff --git a/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java b/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java index 3f3910960..79fed6ba1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/SOUNDINFO.java @@ -31,5 +31,5 @@ public class SOUNDINFO { public long inPoint; public long outPoint; public int loopCount; - public SOUNDENVELOPE envelopeRecords[] = new SOUNDENVELOPE[0]; + public SOUNDENVELOPE[] envelopeRecords = new SOUNDENVELOPE[0]; } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java index 6600c090d..127bb0555 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/TEXTRECORD.java @@ -36,7 +36,7 @@ public class TEXTRECORD { public int xOffset; public int yOffset; public int textHeight; - public GLYPHENTRY glyphEntries[]; + public GLYPHENTRY[] glyphEntries; public String getText(List tags, FontTag font) { String ret = ""; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java index 6c501cccb..10e87aabf 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/ZONERECORD.java @@ -23,7 +23,7 @@ package com.jpexs.decompiler.flash.types; */ public class ZONERECORD { - public ZONEDATA zonedata[] = new ZONEDATA[0]; + public ZONEDATA[] zonedata = new ZONEDATA[0]; public boolean zoneMaskX; public boolean zoneMaskY; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java b/trunk/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java index 6456ceca2..bec4da80e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/filters/COLORMATRIXFILTER.java @@ -28,7 +28,7 @@ public class COLORMATRIXFILTER extends FILTER { /** * Color matrix values */ - public float matrix[] = new float[20]; + public float[] matrix = new float[20]; /** * Constructor @@ -39,7 +39,7 @@ public class COLORMATRIXFILTER extends FILTER { @Override public BufferedImage apply(BufferedImage src) { - float matrix2[][] = new float[4][4]; + float[][] matrix2 = new float[4][4]; for (int y = 0; y < 4; y++) { for (int x = 0; x < 4; x++) { matrix2[y][x] = matrix[y * 5 + x]; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java b/trunk/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java index 090a9f147..e9e8f6715 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/filters/CONVOLUTIONFILTER.java @@ -45,7 +45,7 @@ public class CONVOLUTIONFILTER extends FILTER { /** * Matrix values */ - public float matrix[][] = new float[0][0]; + public float[][] matrix = new float[0][0]; /** * Default color for pixels outside the image */ @@ -70,7 +70,7 @@ public class CONVOLUTIONFILTER extends FILTER { public BufferedImage apply(BufferedImage src) { int height = matrix.length; int width = matrix[0].length; - float matrix2[] = new float[width * height]; + float[] matrix2 = new float[width * height]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { matrix2[y * width + x] = matrix[x][y] * divisor + bias; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/filters/Filtering.java b/trunk/src/com/jpexs/decompiler/flash/types/filters/Filtering.java index 4ac7a0e75..f535c3610 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/filters/Filtering.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/filters/Filtering.java @@ -42,7 +42,7 @@ public class Filtering { public static final int OUTER = 2; public static final int FULL = 3; - private static void boxBlurHorizontal(int[] pixels, int mask[], int w, int h, int radius) { + private static void boxBlurHorizontal(int[] pixels, int[] mask, int w, int h, int radius) { int index = 0; int[] newColors = new int[w]; @@ -105,7 +105,7 @@ public class Filtering { } } - private static void boxBlurVertical(int[] pixels, int mask[], int w, int h, int radius) { + private static void boxBlurVertical(int[] pixels, int[] mask, int w, int h, int radius) { int[] newColors = new int[h]; int oldPixelOffset = -(radius + 1) * w; int newPixelOffset = (radius) * w; @@ -171,7 +171,7 @@ public class Filtering { } } - private static void premultiply(int p[]) { + private static void premultiply(int[] p) { int length = p.length; int offset = 0; length += offset; @@ -189,7 +189,7 @@ public class Filtering { } } - private static void unpremultiply(int p[]) { + private static void unpremultiply(int[] p) { int length = p.length; int offset = 0; length += offset; @@ -250,7 +250,7 @@ public class Filtering { }, new float[]{0, 127f / 255f, 128f / 255f, 1}, blurX, blurY, strength, type, angle, distance, knockout, iterations); } - public static BufferedImage gradientBevel(BufferedImage src, Color[] colors, float ratios[], int blurX, int blurY, float strength, int type, float angle, float distance, boolean knockout, int iterations) { + public static BufferedImage gradientBevel(BufferedImage src, Color[] colors, float[] ratios, int blurX, int blurY, float strength, int type, float angle, float distance, boolean knockout, int iterations) { int width = src.getWidth(); int height = src.getHeight(); BufferedImage retImg = new BufferedImage(width, height, src.getType()); @@ -264,19 +264,19 @@ public class Filtering { } else { boolean inner = type == INNER; - int srcPixels[] = getRGB(src, 0, 0, width, height); + int[] srcPixels = getRGB(src, 0, 0, width, height); BufferedImage gradient = new BufferedImage(512, 1, BufferedImage.TYPE_INT_ARGB); Graphics2D gg = (Graphics2D) gradient.getGraphics(); Point pnt1 = new Point(0, 0); Point pnt2 = new Point(512, 0); gg.setPaint(new LinearGradientPaint(inner ? pnt1 : pnt2, inner ? pnt2 : pnt1, ratios, colors)); gg.fill(new Rectangle(512, 1)); - int gradientPixels[] = getRGB(gradient, 0, 0, gradient.getWidth(), gradient.getHeight()); + int[] gradientPixels = getRGB(gradient, 0, 0, gradient.getWidth(), gradient.getHeight()); BufferedImage hilightIm = dropShadow(src, blurX, blurY, angle, distance, Color.black, inner, iterations, strength, true);//new DropShadowFilter(blurX, blurY, strength, inner ? highlightColor : shadowColor, angle, distance, inner, true, iterations).filter(src); BufferedImage shadowIm = dropShadow(src, blurX, blurY, angle + 180, distance, Color.black, inner, iterations, strength, true); //new DropShadowFilter(blurX, blurY, strength, inner ? shadowColor : highlightColor, angle + 180, distance, inner, true, iterations).filter(src); - int hilight[] = getRGB(hilightIm, 0, 0, width, height); - int shadow[] = getRGB(shadowIm, 0, 0, width, height); + int[] hilight = getRGB(hilightIm, 0, 0, width, height); + int[] shadow = getRGB(shadowIm, 0, 0, width, height); for (int i = 0; i < srcPixels.length; i++) { int ha = (hilight[i] >> 24) & 0xff; int sa = (shadow[i] >> 24) & 0xff; @@ -296,7 +296,7 @@ public class Filtering { setRGB(hilightIm, 0, 0, width, height, hilight); shadow = getRGB(shadowIm, 0, 0, width, height); hilight = getRGB(hilightIm, 0, 0, width, height); - int ret[] = new int[width * height]; + int[] ret = new int[width * height]; for (int i = 0; i < ret.length; i++) { int ah = (hilight[i] >> 24) & 0xff; int as = (shadow[i] >> 24) & 0xff; @@ -324,7 +324,7 @@ public class Filtering { return gradientGlow(src, blurX, blurY, angle, distance, new Color[]{new Color(color.getRed(), color.getGreen(), color.getBlue(), 0), color}, new float[]{0, 1}, inner ? INNER : OUTER, iterations, strength, knockout); } - public static BufferedImage gradientGlow(BufferedImage src, int blurX, int blurY, float angle, double distance, Color colors[], float ratios[], int type, int iterations, float strength, boolean knockout) { + public static BufferedImage gradientGlow(BufferedImage src, int blurX, int blurY, float angle, double distance, Color[] colors, float[] ratios, int type, int iterations, float strength, boolean knockout) { int width = src.getWidth(); int height = src.getHeight(); BufferedImage retImg = new BufferedImage(width, height, src.getType()); @@ -343,21 +343,21 @@ public class Filtering { Graphics2D gg = (Graphics2D) gradient.getGraphics(); gg.setPaint(new LinearGradientPaint(new Point(0, 0), new Point(256, 0), ratios, colors)); gg.fill(new Rectangle(256, 1)); - int gradientPixels[] = getRGB(gradient, 0, 0, gradient.getWidth(), gradient.getHeight()); + int[] gradientPixels = getRGB(gradient, 0, 0, gradient.getWidth(), gradient.getHeight()); double angleRad = angle / 180 * Math.PI; double moveX = (distance * Math.cos(angleRad)); double moveY = (distance * Math.sin(angleRad)); - int srcPixels[] = getRGB(src, 0, 0, width, height); - int revPixels[] = new int[srcPixels.length]; + int[] srcPixels = getRGB(src, 0, 0, width, height); + int[] revPixels = new int[srcPixels.length]; for (int i = 0; i < srcPixels.length; i++) { int alpha = (srcPixels[i] >> 24) & 0xff; alpha = 255 - alpha; revPixels[i] = (srcPixels[i] & 0x00ffffff) + (alpha << 24); } - int shadow[] = new int[srcPixels.length]; + int[] shadow = new int[srcPixels.length]; for (int i = 0; i < srcPixels.length; i++) { int alpha = (srcPixels[i] >> 24) & 0xff; if (inner) { @@ -425,7 +425,7 @@ public class Filtering { } } - private static int[] moveRGB(int width, int height, int rgb[], double deltaX, double deltaY, Color fill) { + private static int[] moveRGB(int width, int height, int[] rgb, double deltaX, double deltaY, Color fill) { BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); setRGB(img, 0, 0, width, height, rgb); BufferedImage retImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); @@ -442,7 +442,7 @@ public class Filtering { return getRGB(retImg, 0, 0, width, height); } - public static BufferedImage convolution(BufferedImage src, float matrix[], int w, int h) { + public static BufferedImage convolution(BufferedImage src, float[] matrix, int w, int h) { BufferedImage dst = new BufferedImage(src.getWidth(), src.getHeight(), src.getType()); BufferedImageOp op = new ConvolveOp(new Kernel(w, h, matrix), ConvolveOp.EDGE_ZERO_FILL, new RenderingHints(null)); op.filter(src, dst); diff --git a/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java b/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java index 5c849efb8..15789dc52 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTBEVELFILTER.java @@ -32,11 +32,11 @@ public class GRADIENTBEVELFILTER extends FILTER { /** * Gradient colors */ - public RGBA gradientColors[] = new RGBA[0]; + public RGBA[] gradientColors = new RGBA[0]; /** * Gradient ratios */ - public int gradientRatio[] = new int[0]; + public int[] gradientRatio = new int[0]; /** * Horizontal blur amount */ @@ -93,11 +93,11 @@ public class GRADIENTBEVELFILTER extends FILTER { colors.add(gradientColors[i].toColor()); ratios.add(gradientRatio[i] / 255f); } - float ratiosAr[] = new float[ratios.size()]; + float[] ratiosAr = new float[ratios.size()]; for (int i = 0; i < ratios.size(); i++) { ratiosAr[i] = ratios.get(i); } - Color colorsArr[] = colors.toArray(new Color[colors.size()]); + Color[] colorsArr = colors.toArray(new Color[colors.size()]); int type = Filtering.INNER; if (onTop && !innerShadow) { type = Filtering.FULL; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java b/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java index 6ab5635de..1eaf820c3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/filters/GRADIENTGLOWFILTER.java @@ -32,11 +32,11 @@ public class GRADIENTGLOWFILTER extends FILTER { /** * Gradient colors */ - public RGBA gradientColors[] = new RGBA[0]; + public RGBA[] gradientColors = new RGBA[0]; /** * Gradient ratios */ - public int gradientRatio[]; + public int[] gradientRatio; /** * Horizontal blur amount */ @@ -103,7 +103,7 @@ public class GRADIENTGLOWFILTER extends FILTER { type = Filtering.OUTER; } - float ratiosAr[] = new float[ratios.size()]; + float[] ratiosAr = new float[ratios.size()]; for (int i = 0; i < ratios.size(); i++) { ratiosAr[i] = ratios.get(i); } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java index af0873a77..10bfe226b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java @@ -208,11 +208,11 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters { } - float focRadFractions[] = new float[ratiosFocRad.size()]; + float[] focRadFractions = new float[ratiosFocRad.size()]; for (int i = 0; i < ratiosFocRad.size(); i++) { focRadFractions[i] = ratiosFocRad.get(i); } - Color focRadColors[] = colorsFocRad.toArray(new Color[colorsFocRad.size()]); + Color[] focRadColors = colorsFocRad.toArray(new Color[colorsFocRad.size()]); RGB focEndColor = fillStyle0.focalGradient.gradientRecords[fillStyle0.focalGradient.gradientRecords.length - 1].color; RGBA focEndColorA = fillStyle0.focalGradient.gradientRecords[fillStyle0.focalGradient.gradientRecords.length - 1].colorA; @@ -260,11 +260,11 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters { - float ratiosRadAr[] = new float[ratiosRad.size()]; + float[] ratiosRadAr = new float[ratiosRad.size()]; for (int i = 0; i < ratiosRad.size(); i++) { ratiosRadAr[i] = ratiosRad.get(i); } - Color colorsRadArr[] = colorsRad.toArray(new Color[colorsRad.size()]); + Color[] colorsRadArr = colorsRad.toArray(new Color[colorsRad.size()]); RGB endColor = fillStyle0.gradient.gradientRecords[fillStyle0.gradient.gradientRecords.length - 1].color; RGBA endColorA = fillStyle0.gradient.gradientRecords[fillStyle0.gradient.gradientRecords.length - 1].colorA; @@ -312,11 +312,11 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters { - float ratiosAr[] = new float[ratios.size()]; + float[] ratiosAr = new float[ratios.size()]; for (int i = 0; i < ratios.size(); i++) { ratiosAr[i] = ratios.get(i); } - Color colorsArr[] = colors.toArray(new Color[colors.size()]); + Color[] colorsArr = colors.toArray(new Color[colors.size()]); GeneralPath pathLin = toGeneralPath(startX, startY); g.fill(pathLin); @@ -883,7 +883,7 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters { fontSize = 1024; } List retList = new ArrayList<>(); - String defaultFonts[] = new String[]{"Times New Roman", "Arial"}; + String[] defaultFonts = new String[]{"Times New Roman", "Arial"}; Font f = null; if (existingFonts.contains(fontName)) { f = new Font(fontName, fontStyle, fontSize); @@ -900,7 +900,7 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters { } GlyphVector v = f.createGlyphVector((new JPanel()).getFontMetrics(f).getFontRenderContext(), "" + character); Shape shp = v.getOutline(); - double points[] = new double[6]; + double[] points = new double[6]; int lastX = 0; int lastY = 0; int startX = 0; @@ -938,13 +938,13 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters { lastY = (int) Math.round(points[1]); break; case PathIterator.SEG_CUBICTO: - double cubicCoords[] = new double[]{ + double[] cubicCoords = new double[]{ lastX, lastY, Math.round(points[0]), Math.round(points[1]), Math.round(points[2]), Math.round(points[3]), Math.round(points[4]), Math.round(points[5]) }; - double quadCoords[][] = approximateCubic(cubicCoords); + double[][] quadCoords = approximateCubic(cubicCoords); for (int i = 0; i < quadCoords.length; i++) { CurvedEdgeRecord cer = new CurvedEdgeRecord(); cer.controlDeltaX = multiplier * (((int) Math.round(quadCoords[i][0])) - lastX); diff --git a/trunk/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java b/trunk/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java index 7a00bae1d..df209456c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/sound/AdpcmDecoder.java @@ -32,19 +32,19 @@ import java.io.OutputStream; */ public class AdpcmDecoder { - private static final int indexAdjustTable2bit[] = { + private static final int[] indexAdjustTable2bit = { -1, 2, -1, 2}; - private static final int indexAdjustTable3bit[] = { + private static final int[] indexAdjustTable3bit = { -1, -1, 2, 4, -1, -1, 2, 4}; - private static final int indexAdjustTable4bit[] = { + private static final int[] indexAdjustTable4bit = { -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8}; - private static final int indexAdjustTable5bit[] = { + private static final int[] indexAdjustTable5bit = { -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16}; - private static final int stepSizeTable[] = { + private static final int[] stepSizeTable = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, @@ -200,7 +200,7 @@ public class AdpcmDecoder { return state.sample; } - public static byte[] decode(byte data[], boolean isStereo) throws IOException { + public static byte[] decode(byte[] data, boolean isStereo) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); decode(new ByteArrayInputStream(data), baos, isStereo); return baos.toByteArray(); diff --git a/trunk/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java b/trunk/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java index 9d8382714..d1bd642d8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/sound/MP3FRAME.java @@ -77,13 +77,13 @@ public class MP3FRAME { } public int getBitrate() { - int v1_l1_map[] = {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1}; - int v1_l2_map[] = {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1}; - int v1_l3_map[] = {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1}; - int v2_l1_map[] = {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1}; - int v2_l2l3_map[] = {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1}; + int[] v1_l1_map = {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1}; + int[] v1_l2_map = {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1}; + int[] v1_l3_map = {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1}; + int[] v2_l1_map = {0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1}; + int[] v2_l2l3_map = {0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1}; - int map[][][] = { + int[][][] map = { {v1_l1_map, v1_l2_map, v1_l3_map}, {v2_l1_map, v2_l2l3_map, v2_l2l3_map} }; diff --git a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index 8bf2540bc..1af79cfee 100644 --- a/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/trunk/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -360,7 +360,7 @@ public class XFLConverter { ret += ">"; ret += "" + convertMatrix(fs.gradientMatrix) + ""; - GRADRECORD records[]; + GRADRECORD[] records; if (fs.fillStyleType == FILLSTYLE.FOCAL_RADIAL_GRADIENT) { records = fs.focalGradient.gradientRecords; } else { @@ -1167,7 +1167,7 @@ public class XFLConverter { ButtonTag button = (ButtonTag) symbol; List records = button.getRecords(); - String frames[] = {"", "", "", ""}; + String[] frames = {"", "", "", ""}; int maxDepth = 0; for (BUTTONRECORD rec : records) { @@ -1318,8 +1318,8 @@ public class XFLConverter { int soundType = 0; int soundSize = 0; long soundSampleCount = 0; - byte soundData[] = new byte[0]; - int rateMap[] = {5, 11, 22, 44}; + byte[] soundData = new byte[0]; + int[] rateMap = {5, 11, 22, 44}; String exportFormat = "flv"; if (symbol instanceof SoundStreamHeadTypeTag) { SoundStreamHeadTypeTag sstream = (SoundStreamHeadTypeTag) symbol; @@ -1439,7 +1439,7 @@ public class XFLConverter { Logger.getLogger(XFLConverter.class.getName()).log(Level.SEVERE, null, ex); } } - byte data[] = new byte[0]; + byte[] data = new byte[0]; try { data = swf.exportSound(symbol); } catch (IOException ex) { @@ -1486,7 +1486,7 @@ public class XFLConverter { break; } - byte data[] = new byte[0]; + byte[] data = new byte[0]; try { data = swf.exportMovie(video); } catch (IOException ex) { @@ -2114,7 +2114,7 @@ public class XFLConverter { return ret; } - private static void writeFile(AbortRetryIgnoreHandler handler, final byte data[], final String file) throws IOException { + private static void writeFile(AbortRetryIgnoreHandler handler, final byte[] data, final String file) throws IOException { new RetryTask(new RunnableIOEx() { @Override public void run() throws IOException { @@ -2249,7 +2249,7 @@ public class XFLConverter { FontTag font = null; String fontName = null; String psFontName = null; - String availableFonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); + String[] availableFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); int textHeight = -1; RGB textColor = null; RGBA textColorA = null; @@ -2463,7 +2463,7 @@ public class XFLConverter { rightMargin = det.rightMargin; indent = det.indent; lineSpacing = det.leading; - String alignNames[] = {"left", "right", "center", "justify"}; + String[] alignNames = {"left", "right", "center", "justify"}; alignment = alignNames[det.align]; } ret += ""; @@ -2919,7 +2919,7 @@ public class XFLConverter { } private static int normContrast(double c) { - double ctrMap[] = { + double[] ctrMap = { // 0 1 2 3 4 5 6 7 8 9 /*0*/0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11, /*1*/ 0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24, @@ -2953,7 +2953,7 @@ public class XFLConverter { } public static String convertAdjustColorFilter(COLORMATRIXFILTER filter) { - float matrix[][] = new float[5][5]; + float[][] matrix = new float[5][5]; int index = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 5; j++) { @@ -3108,7 +3108,7 @@ public class XFLConverter { rightMargin = det.rightMargin; indent = det.indent; lineSpacing = det.leading; - String alignNames[] = {"left", "right", "center", "justify"}; + String[] alignNames = {"left", "right", "center", "justify"}; alignment = alignNames[det.align]; } this.tags = tags; diff --git a/trunk/src/com/jpexs/decompiler/graph/Graph.java b/trunk/src/com/jpexs/decompiler/graph/Graph.java index 8a9163797..d77fcad41 100644 --- a/trunk/src/com/jpexs/decompiler/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/graph/Graph.java @@ -2012,7 +2012,7 @@ public class Graph { private List makeGraph(GraphSource code, List allBlocks, List alternateEntries) { HashMap> refs = code.visitCode(alternateEntries); List ret = new ArrayList<>(); - boolean visited[] = new boolean[code.size()]; + boolean[] visited = new boolean[code.size()]; ret.add(makeGraph(null, new GraphPath(), code, 0, 0, allBlocks, refs, visited)); for (int pos : alternateEntries) { GraphPart e1 = new GraphPart(-1, -1); @@ -2027,7 +2027,7 @@ public class Graph { return ip; } - private GraphPart makeGraph(GraphPart parent, GraphPath path, GraphSource code, int startip, int lastIp, List allBlocks, HashMap> refs, boolean visited2[]) { + private GraphPart makeGraph(GraphPart parent, GraphPath path, GraphSource code, int startip, int lastIp, List allBlocks, HashMap> refs, boolean[] visited2) { int ip = startip; for (GraphPart p : allBlocks) { @@ -2164,7 +2164,7 @@ public class Graph { ret.append("\r\n"); } } - String parts[] = ret.toString().split("\r\n"); + String[] parts = ret.toString().split("\r\n"); ret = new StringBuilder(); String labelPattern = "loop(switch)?[0-9]*:"; diff --git a/trunk/src/com/jpexs/helpers/Helper.java b/trunk/src/com/jpexs/helpers/Helper.java index 5e96d7345..1add4c3ca 100644 --- a/trunk/src/com/jpexs/helpers/Helper.java +++ b/trunk/src/com/jpexs/helpers/Helper.java @@ -61,7 +61,7 @@ public class Helper { * @param array Array of int values * @return String representation of the array */ - public static String intArrToString(int array[]) { + public static String intArrToString(int[] array) { String s = "["; for (int i = 0; i < array.length; i++) { if (i > 0) { @@ -79,7 +79,7 @@ public class Helper { * @param array Array of byte values * @return String representation of the array */ - public static String byteArrToString(byte array[]) { + public static String byteArrToString(byte[] array) { String s = "["; for (int i = 0; i < array.length; i++) { if (i > 0) { @@ -221,7 +221,7 @@ public class Helper { } else if (s.endsWith("\n")) { s = s.substring(0, s.length() - 1); } - String parts[] = s.split("(\r\n|\r|\n)"); + String[] parts = s.split("(\r\n|\r|\n)"); return parts.length; } @@ -233,11 +233,11 @@ public class Helper { return ret; } - public static String bytesToHexString(byte bytes[]) { + public static String bytesToHexString(byte[] bytes) { return bytesToHexString(bytes, 0); } - public static String bytesToHexString(byte bytes[], int start) { + public static String bytesToHexString(byte[] bytes, int start) { StringBuilder sb = new StringBuilder(); if (start < bytes.length) { for (int ii = start; ii < bytes.length; ii++) { @@ -249,12 +249,12 @@ public class Helper { return sb.toString(); } - public static String bytesToHexString(int maxByteCountInString, byte bytes[], int start) { + public static String bytesToHexString(int maxByteCountInString, byte[] bytes, int start) { if (bytes.length - start <= maxByteCountInString) { return bytesToHexString(bytes, start); } - byte trailingBytes[] = new byte[maxByteCountInString / 2]; - byte headingBytes[] = new byte[maxByteCountInString - trailingBytes.length]; + byte[] trailingBytes = new byte[maxByteCountInString / 2]; + byte[] headingBytes = new byte[maxByteCountInString - trailingBytes.length]; System.arraycopy(bytes, start, headingBytes, 0, headingBytes.length); int startOfTrailingBytes = bytes.length - trailingBytes.length; System.arraycopy(bytes, startOfTrailingBytes, trailingBytes, 0, trailingBytes.length); @@ -292,7 +292,7 @@ public class Helper { return ret; } - public static String joinStrings(String arr[], String glue) { + public static String joinStrings(String[] arr, String glue) { String ret = ""; boolean first = true; for (String s : arr) { @@ -348,7 +348,7 @@ public class Helper { ByteArrayOutputStream baos = new ByteArrayOutputStream(); for (String f : file) { try (FileInputStream fis = new FileInputStream(f)) { - byte buf[] = new byte[4096]; + byte[] buf = new byte[4096]; int cnt = 0; while ((cnt = fis.read(buf)) > 0) { baos.write(buf, 0, cnt); @@ -362,7 +362,7 @@ public class Helper { public static void writeFile(String file, byte[]... data) { try (FileOutputStream fos = new FileOutputStream(file)) { - for (byte d[] : data) { + for (byte[] d : data) { fos.write(d); } } catch (IOException ex) { @@ -463,7 +463,7 @@ public class Helper { } public static String strToHex(String s) { - byte bs[]; + byte[] bs; try { bs = s.getBytes("utf-8"); } catch (UnsupportedEncodingException ex) { diff --git a/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java b/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java index d1f59fa03..75ff7f240 100644 --- a/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java +++ b/trunk/src/com/jpexs/process/win32/Win32ProcessTools.java @@ -146,7 +146,7 @@ public class Win32ProcessTools extends ProcessTools { public static Map getDriveMappings() { Map ret = new HashMap<>(); for (char d = 'A'; d <= 'Z'; d++) { - char buf[] = new char[1024]; + char[] buf = new char[1024]; int len = Kernel32.INSTANCE.QueryDosDevice("" + d + ":", buf, buf.length).intValue(); String tar = new String(buf, 0, len); tar = tar.trim(); @@ -392,7 +392,7 @@ public class Win32ProcessTools extends ProcessTools { } long actualPos = 0; - byte prevBytes[] = new byte[0]; + byte[] prevBytes = new byte[0]; List guardedPages = new ArrayList<>(); for (int pg = 0; pg < pages.size(); pg++) { MEMORY_BASIC_INFORMATION mbi = pages.get(pg); @@ -412,10 +412,10 @@ public class Win32ProcessTools extends ProcessTools { break; } - byte data[] = buf.getByteArray(0, bytesReadRef.getValue()); + byte[] data = buf.getByteArray(0, bytesReadRef.getValue()); prevBytes = Arrays.copyOfRange(data, data.length - maxFindLen, data.length); - byte dataPlusPrev[] = mergeArrays(prevBytes, data); + byte[] dataPlusPrev = mergeArrays(prevBytes, data); loopi: for (int i = 0; i < dataPlusPrev.length - maxFindLen; i++) { loopk: @@ -538,7 +538,7 @@ public class Win32ProcessTools extends ProcessTools { private int currentPage = 0; private int pagePos = 0; private static int BUFFER_SIZE = 1024; - private byte buf[]; + private byte[] buf; private int bufPos; private HANDLE hOtherProcess; diff --git a/trunk/src/com/sun/jna/platform/win32/Advapi32Util.java b/trunk/src/com/sun/jna/platform/win32/Advapi32Util.java index fd75fe423..f4fc27151 100644 --- a/trunk/src/com/sun/jna/platform/win32/Advapi32Util.java +++ b/trunk/src/com/sun/jna/platform/win32/Advapi32Util.java @@ -827,7 +827,7 @@ public abstract class Advapi32Util { * @return A environment block */ public static String getEnvironmentBlock(Map environment) { - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); for (Entry entry : environment.entrySet()) { if (entry.getValue() != null) { out.append(entry.getKey() + "=" + entry.getValue() + "\0"); diff --git a/trunk/src/com/sun/jna/platform/win32/Kernel32.java b/trunk/src/com/sun/jna/platform/win32/Kernel32.java index d2cfa5ad3..cbcbbcd68 100644 --- a/trunk/src/com/sun/jna/platform/win32/Kernel32.java +++ b/trunk/src/com/sun/jna/platform/win32/Kernel32.java @@ -277,7 +277,7 @@ public interface Kernel32 extends WinNT { public static int TH32CS_SNAPPROCESS = 0x00000002; //Needed for some Windows 7 Versions - //boolean EnumProcesses(int []ProcessIDsOut,int size , int[] BytesReturned); + //boolean EnumProcesses(int[] ProcessIDsOut, int size, int[] BytesReturned); int GetProcessImageFileNameW(HANDLE Process, char[] outputname, int lenght); DWORD QueryDosDevice(String lpDeviceName, char[] lpTargetPath, int lenght); diff --git a/trunk/src/com/sun/jna/platform/win32/WinNT.java b/trunk/src/com/sun/jna/platform/win32/WinNT.java index 75c925279..362444c8b 100644 --- a/trunk/src/com/sun/jna/platform/win32/WinNT.java +++ b/trunk/src/com/sun/jna/platform/win32/WinNT.java @@ -255,7 +255,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD { * Specifies an array of LUID_AND_ATTRIBUTES structures. Each structure * contains the LUID and attributes of a privilege. */ - public LUID_AND_ATTRIBUTES Privileges[]; + public LUID_AND_ATTRIBUTES[] Privileges; @Override protected List getFieldOrder() { @@ -1234,7 +1234,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD { * Pointer to a null-terminated string, such as "Service Pack 3", that * indicates the latest Service Pack installed on the system. */ - public char szCSDVersion[]; + public char[] szCSDVersion; @Override protected List getFieldOrder() { @@ -1286,7 +1286,7 @@ public interface WinNT extends WinError, WinDef, WinBase, BaseTSD { * the latest Service Pack installed on the system. If no Service Pack * has been installed, the string is empty. */ - public char szCSDVersion[]; + public char[] szCSDVersion; /** * The major version number of the latest Service Pack installed on the * system. For example, for Service Pack 3, the major version number is