public virtual void encode(ActionList actionList) { // write the actions for (int i = 0; i < actionList.size(); i++) { Action a = actionList.getAction(i); switch (a.code) { // don't update actionCount for synthetic opcodes case ActionList.sactionLabel: a.visit(this); break; case ActionList.sactionLineRecord: if (debug != null) { debug.offset(writer.Pos, (LineRecord)a); } break; case ActionList.sactionRegisterRecord: if (debug != null) { debug.registers(writer.Pos, (RegisterRecord)a); } break; // the remaining types need counting case flash.swf.ActionConstants_Fields.sactionPush: i = encodePush((Push)a, i, actionList); actionCount++; break; default: if (a.code < 0x80) { writer.writeUI8(a.code); } else { a.visit(this); } actionCount++; break; } } patchForwardBranches(); }
private void encodeBlurFilter(SwfEncoder w, BlurFilter f) { w.write32(f.blurX); w.write32(f.blurY); w.writeUI8(f.passes); }
private void encodeButtonRecord(ButtonRecord record, SwfEncoder w, int defineButton) { if (defineButton == flash.swf.TagValues_Fields.stagDefineButton2) { w.writeUBits(0, 2); w.writeBit(record.blendMode != - 1); w.writeBit(record.filters != null); } else { w.writeUBits(0, 4); } w.writeBit(record.hitTest); w.writeBit(record.down); w.writeBit(record.over); w.writeBit(record.up); w.writeUI16(dict.getId(record.characterRef)); w.writeUI16(record.placeDepth); encodeMatrix(record.placeMatrix, w); if (defineButton == flash.swf.TagValues_Fields.stagDefineButton2) { encodeCxforma(record.colorTransform, w); if (record.filters != null) { this.encodeFilterList(record.filters, w); } if (record.blendMode != - 1) { w.writeUI8(record.blendMode); } } }
private void encodeSoundInfo(SoundInfo info, SwfEncoder w) { w.writeUBits(0, 2); // reserved w.writeBit(info.syncStop); w.writeBit(info.syncNoMultiple); w.writeBit(info.records != null); w.writeBit(info.loopCount != SoundInfo.UNINITIALIZED); w.writeBit(info.outPoint != SoundInfo.UNINITIALIZED); w.writeBit(info.inPoint != SoundInfo.UNINITIALIZED); if (info.inPoint != SoundInfo.UNINITIALIZED) { w.write32((int) info.inPoint); } if (info.outPoint != SoundInfo.UNINITIALIZED) { w.write32((int) info.outPoint); } if (info.loopCount != SoundInfo.UNINITIALIZED) { w.writeUI16(info.loopCount); } if (info.records != null) { w.writeUI8(info.records.Length); for (int k = 0; k < info.records.Length; k++) { w.write64(info.records[k]); } } }
private void encodeTextRecord(TextRecord record, SwfEncoder w, int type, int glyphBits, int advanceBits) { w.writeUI8(record.flags); if (record.hasFont()) { w.writeUI16(dict.getId(record.font)); } if (record.hasColor()) { if (type == flash.swf.TagValues_Fields.stagDefineText2) encodeRGBA(record.color, w); else encodeRGB(record.color, w); } if (record.hasX()) { w.writeSI16(record.xOffset); } if (record.hasY()) { w.writeSI16(record.yOffset); } if (record.hasHeight()) { w.writeUI16(record.height); } w.writeUI8(record.entries.Length); for (int i = 0; i < record.entries.Length; i++) { w.writeUBits(record.entries[i].Index, glyphBits); w.writeSBits(record.entries[i].advance, advanceBits); } w.flushBits(); }
/// <param name="rgb">as 0x00RRGGBB /// </param> /// <param name="w"> /// </param> private void encodeRGB(int rgb, SwfEncoder w) { w.writeUI8(SupportClass.URShift(rgb, 16)); // red. we don't mask this because if rgb has an Alpha value, something's wrong w.writeUI8((SupportClass.URShift(rgb, 8)) & 255); w.writeUI8(rgb & 255); // blue }
private void encodeMorphFillstyles(MorphFillStyle[] fillStyles, SwfEncoder w, int code) { int count = fillStyles.Length; if (count >= 0xFF) { w.writeUI8(0xFF); w.writeUI16(count); } else { w.writeUI8(count); } for (int i = 0; i < count; i++) { encodeMorphFillstyle(fillStyles[i], w, code); } }
private void encodeBevelFilter(SwfEncoder w, BevelFilter f) { encodeRGBA(f.shadowColor, w); encodeRGBA(f.highlightColor, w); w.write32(f.blurX); w.write32(f.blurY); w.write32(f.angle); w.write32(f.distance); w.writeUI16(f.strength); w.writeUI8(f.flags); }
private void encodeGradRecord(GradRecord record, SwfEncoder w, int shape) { w.writeUI8(record.ratio); if ((shape == flash.swf.TagValues_Fields.stagDefineShape3) || (shape == flash.swf.TagValues_Fields.stagDefineShape6)) encodeRGBA(record.color, w); else encodeRGB(record.color, w); }
private void encodeKerningRecord(KerningRecord kerningRecord, SwfEncoder w, bool wideCodes) { if (wideCodes) { w.writeUI16(kerningRecord.code1); w.writeUI16(kerningRecord.code2); } else { w.writeUI8(kerningRecord.code1); w.writeUI8(kerningRecord.code2); } w.writeUI16(kerningRecord.adjustment); }
private void encodeFillStyle(FillStyle style, SwfEncoder w, int shape) { w.writeUI8(style.type); switch (style.type) { case FillStyle.FILL_SOLID: // 0x00 if ((shape == flash.swf.TagValues_Fields.stagDefineShape3) || (shape == flash.swf.TagValues_Fields.stagDefineShape6)) encodeRGBA(style.color, w); else encodeRGB(style.color, w); break; case FillStyle.FILL_GRADIENT: // 0x10 linear gradient fill case FillStyle.FILL_RADIAL_GRADIENT: // 0x12 radial gradient fill case FillStyle.FILL_FOCAL_RADIAL_GRADIENT: // 0x13 focal radial gradient fill encodeMatrix(style.matrix, w); encodeGradient(style.gradient, w, shape); break; case FillStyle.FILL_BITS: // 0x40 tiled bitmap fill case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP): // 0x41 clipped bitmap fill case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_NOSMOOTH): // 0x42 tiled non-smoothed fill case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP | FillStyle.FILL_BITS_NOSMOOTH): // 0x43 clipped non-smoothed fill w.writeUI16(dict.getId(style.bitmap)); encodeMatrix(style.matrix, w); break; } }
private void encodeFillstyles(System.Collections.ArrayList fillstyles, SwfEncoder w, int shape) { int count = fillstyles.Count; if (count >= 0xFF) { w.writeUI8(0xFF); w.writeUI16(count); } else { w.writeUI8(count); } System.Collections.IEnumerator it = fillstyles.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (it.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" FillStyle style = (FillStyle) it.Current; encodeFillStyle(style, w, shape); } }
private void encodeLinestyles(System.Collections.ArrayList linestyles, SwfEncoder w, int shape) { int count = linestyles.Count; if (count > 0xFF) { w.writeUI8(0xFF); w.writeUI16(count); } else { w.writeUI8(count); } for (int i = 0; i < count; i++) { encodeLineStyle((LineStyle) linestyles[i], w, shape); } }
private void encodeConvolutionFilter(SwfEncoder w, ConvolutionFilter f) { w.writeUI8(f.matrixX); w.writeUI8(f.matrixY); w.writeFloat(f.divisor); w.writeFloat(f.bias); for (int i = 0; i < f.matrix.Length; ++i) w.writeFloat(f.matrix[i]); w.writeUI8(f.flags); }
private void encodeMorphFillstyle(MorphFillStyle style, SwfEncoder w, int code) { w.writeUI8(style.type); switch (style.type) { case FillStyle.FILL_SOLID: // 0x00 encodeRGBA(style.startColor, w); encodeRGBA(style.endColor, w); break; case FillStyle.FILL_GRADIENT: // 0x10 linear gradient fill case FillStyle.FILL_RADIAL_GRADIENT: // 0x12 radial gradient fill case FillStyle.FILL_FOCAL_RADIAL_GRADIENT: // 0x13 focal radial gradient fill encodeMatrix(style.startGradientMatrix, w); encodeMatrix(style.endGradientMatrix, w); encodeMorphGradient(style.gradRecords, w); if (style.type == FillStyle.FILL_FOCAL_RADIAL_GRADIENT && code == flash.swf.TagValues_Fields.stagDefineMorphShape2) { w.writeSI16(style.ratio1); w.writeSI16(style.ratio2); } break; case FillStyle.FILL_BITS: // 0x40 tiled bitmap fill case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP): // 0x41 clipped bitmap fill case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_NOSMOOTH): // 0x42 tiled non-smoothed fill case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP | FillStyle.FILL_BITS_NOSMOOTH): // 0x43 clipped non-smoothed fill w.writeUI16(dict.getId(style.bitmap)); encodeMatrix(style.startBitmapMatrix, w); encodeMatrix(style.endBitmapMatrix, w); break; default: assert(false); //throw new IOException("unrecognized fill style type: " + style.type); break; } }
private void encodeGlowFilter(SwfEncoder w, GlowFilter f) { encodeRGBA(f.color, w); w.write32(f.blurX); w.write32(f.blurY); w.writeUI16(f.strength); w.writeUI8(f.flags); }
private void encodeMorphGradient(MorphGradRecord[] gradRecords, SwfEncoder w) { w.writeUI8(gradRecords.Length); for (int i = 0; i < gradRecords.Length; i++) { MorphGradRecord record = gradRecords[i]; w.writeUI8(record.startRatio); encodeRGBA(record.startColor, w); w.writeUI8(record.endRatio); encodeRGBA(record.endColor, w); } }
private void encodeGradientBevelFilter(SwfEncoder w, GradientBevelFilter f) { w.writeUI8(f.numcolors); for (int i = 0; i < f.numcolors; ++i) encodeRGBA(f.gradientColors[i], w); for (int i = 0; i < f.numcolors; ++i) w.writeUI8(f.gradientRatio[i]); // w.write32( f.shadowColor ); // w.write32( f.highlightColor ); w.write32(f.blurX); w.write32(f.blurY); w.write32(f.angle); w.write32(f.distance); w.writeUI16(f.strength); w.writeUI8(f.flags); }
private void encodeMorphLinestyles(MorphLineStyle[] lineStyles, SwfEncoder w, int code) { if (lineStyles.Length >= 0xFF) { w.writeUI8(0xFF); w.writeUI16(lineStyles.Length); } else { w.writeUI8(lineStyles.Length); } for (int i = 0; i < lineStyles.Length; i++) { MorphLineStyle style = lineStyles[i]; w.writeUI16(style.startWidth); w.writeUI16(style.endWidth); if (code == flash.swf.TagValues_Fields.stagDefineMorphShape2) { w.writeUBits(style.startCapsStyle, 2); w.writeUBits(style.jointStyle, 2); w.writeBit(style.hasFill); w.writeBit(style.noHScale); w.writeBit(style.noVScale); w.writeBit(style.pixelHinting); w.writeUBits(0, 5); // reserved w.writeBit(style.noClose); w.writeUBits(style.endCapsStyle, 2); if (style.jointStyle == 2) { w.writeUI16(style.miterLimit); } } if (!style.hasFill) { encodeRGBA(style.startColor, w); encodeRGBA(style.endColor, w); } if (style.hasFill) { encodeMorphFillstyle(style.fillType, w, code); } } }
public override void header(Header header) { // get some header properties we need to know int swfVersion = header.version; this.header_Renamed_Field = header; this.writer = createEncoder(swfVersion); this.tagw = createEncoder(swfVersion); width = header.size.Width; height = header.size.Height; frames = 0; // write the header writer.writeUI8(header.compressed?'C':'F'); writer.writeUI8('W'); writer.writeUI8('S'); writer.writeUI8(header.version); writer.write32((int) header.length); if (header.compressed) { writer.markComp(); } encodeRect(header.size, writer); writer.writeUI8(header.rate >> 8); writer.writeUI8(header.rate & 255); framecountPos = writer.Pos; writer.writeUI16(header.framecount); }
private void encodeDefineText(DefineText tag, SwfEncoder w, int type) { int id = dict.add(tag); w.writeUI16(id); encodeRect(tag.bounds, w); encodeMatrix(tag.matrix, w); int length = tag.records.Count; // compute necessary bit width int glyphBits = 0; int advanceBits = 0; for (int i = 0; i < length; i++) { TextRecord tr = (TextRecord) tag.records[i]; for (int j = 0; j < tr.entries.Length; j++) { GlyphEntry entry = tr.entries[j]; while (entry.Index > (1 << glyphBits)) glyphBits++; while (System.Math.Abs(entry.advance) > (1 << advanceBits)) advanceBits++; } } // increment to get from bit index to bit count. ++glyphBits; ++advanceBits; w.writeUI8(glyphBits); w.writeUI8(++advanceBits); // add one extra bit because advances are signed for (int i = 0; i < length; i++) { TextRecord record = (TextRecord) tag.records[i]; encodeTextRecord(record, w, type, glyphBits, advanceBits); } w.writeUI8(0); }
/// <param name="rgba">as 0xAARRGGBB /// </param> /// <param name="w"> /// </param> private void encodeRGBA(int rgba, SwfEncoder w) { w.writeUI8((SupportClass.URShift(rgba, 16)) & 255); // red w.writeUI8((SupportClass.URShift(rgba, 8)) & 255); // green w.writeUI8(rgba & 255); // blue w.writeUI8(SupportClass.URShift(rgba, 24)); // alpha }
private void encodeFilterList(System.Collections.IList filters, SwfEncoder w) { int count = filters.Count; w.writeUI8(count); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" for (System.Collections.IEnumerator it = filters.GetEnumerator(); it.MoveNext(); ) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" Filter f = (Filter) it.Current; w.writeUI8(f.getID()); // I've never quite understood why the serialization code isn't in the tags themselves.. switch (f.getID()) { case DropShadowFilter.ID: encodeDropShadowFilter(w, (DropShadowFilter) f); break; case BlurFilter.ID: encodeBlurFilter(w, (BlurFilter) f); break; case ConvolutionFilter.ID: encodeConvolutionFilter(w, (ConvolutionFilter) f); break; case GlowFilter.ID: encodeGlowFilter(w, (GlowFilter) f); break; case BevelFilter.ID: encodeBevelFilter(w, (BevelFilter) f); break; case ColorMatrixFilter.ID: encodeColorMatrixFilter(w, (ColorMatrixFilter) f); break; case GradientGlowFilter.ID: encodeGradientGlowFilter(w, (GradientGlowFilter) f); break; case GradientBevelFilter.ID: encodeGradientBevelFilter(w, (GradientBevelFilter) f); break; } } }
private void encodeButtonCondAction(ButtonCondAction condAction, SwfEncoder w, bool last) { int pos = w.Pos; w.writeUI16(0); w.writeUBits(condAction.keyPress, 7); w.writeBit(condAction.overDownToIdle); w.writeBit(condAction.idleToOverDown); w.writeBit(condAction.outDownToIdle); w.writeBit(condAction.outDownToOverDown); w.writeBit(condAction.overDownToOutDown); w.writeBit(condAction.overDownToOverUp); w.writeBit(condAction.overUpToOverDown); w.writeBit(condAction.overUpToIdle); w.writeBit(condAction.idleToOverUp); new ActionEncoder(w, debug).encode(condAction.actionList); w.writeUI8(0); // end action byte if (!last) { w.writeUI16at(pos, w.Pos - pos); } }
private void encodeDropShadowFilter(SwfEncoder w, DropShadowFilter f) { encodeRGBA(f.color, w); w.write32(f.blurX); w.write32(f.blurY); w.write32(f.angle); w.write32(f.distance); w.writeUI16(f.strength); w.writeUI8(f.flags); }
private void encodeSwdData(SwfEncoder buffer) { // Encode the header. buffer.write32(('F') | ('W' << 8) | ('D' << 16) | (version << 24)); // Encode one kDebugID tag. buffer.write32(flash.swf.DebugTags_Fields.kDebugID); buffer.write(debugID); // Encode the kDebugScript and kDebugOffset tags. // The kDebugScript tags are in module number order (1,2,3,...). // After each one of these are the associated kDebugOffset tags // for that module number, in ascending order // by line number and byte offset. SupportClass.CollectionsSupport.Sort(debugScripts, null); int id = 0; System.Collections.IEnumerator debugScriptIter = debugScripts.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (debugScriptIter.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugScript debugScript = (DebugScript) debugScriptIter.Current; id++; buffer.write32(flash.swf.DebugTags_Fields.kDebugScript); buffer.write32(id); buffer.write32(debugScript.bitmap); buffer.writeString(debugScript.name); buffer.writeString(debugScript.text); SupportClass.CollectionsSupport.Sort(debugScript.debugOffsets, null); System.Collections.IEnumerator debugOffsetIter = debugScript.debugOffsets.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (debugOffsetIter.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugOffset debugOffset = (DebugOffset) debugOffsetIter.Current; buffer.write32(flash.swf.DebugTags_Fields.kDebugOffset); buffer.write32(id); buffer.write32(debugOffset.lineNumber); buffer.write32(debugOffset.byteOffset); } } // Encode the kDebugRegister tags SupportClass.CollectionsSupport.Sort(debugRegisters, null); System.Collections.IEnumerator itr = debugRegisters.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (itr.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugRegisters debug = (DebugRegisters) itr.Current; int size = debug.registerNumbers.Length; buffer.write32(flash.swf.DebugTags_Fields.kDebugRegisters); buffer.write32(debug.offset); buffer.writeUI8(size); for (int i = 0; i < debug.registerNumbers.Length; i++) { buffer.writeUI8(debug.registerNumbers[i]); buffer.writeString(debug.variableNames[i]); } } // Encode the kDebugBreakpoint tags SupportClass.CollectionsSupport.Sort(debugBreakpoints, null); System.Collections.IEnumerator debugBreakpointIterator = debugBreakpoints.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (debugBreakpointIterator.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugBreakpoint debugBreakpoint = (DebugBreakpoint) debugBreakpointIterator.Current; buffer.write32(flash.swf.DebugTags_Fields.kDebugBreakpoint); buffer.write32(debugBreakpoint.offset); } }
private void encodeSwdData(SwfEncoder buffer) { // Encode the header. buffer.write32(('F') | ('W' << 8) | ('D' << 16) | (version << 24)); // Encode one kDebugID tag. buffer.write32(flash.swf.DebugTags_Fields.kDebugID); buffer.write(debugID); // Encode the kDebugScript and kDebugOffset tags. // The kDebugScript tags are in module number order (1,2,3,...). // After each one of these are the associated kDebugOffset tags // for that module number, in ascending order // by line number and byte offset. SupportClass.CollectionsSupport.Sort(debugScripts, null); int id = 0; System.Collections.IEnumerator debugScriptIter = debugScripts.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (debugScriptIter.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugScript debugScript = (DebugScript)debugScriptIter.Current; id++; buffer.write32(flash.swf.DebugTags_Fields.kDebugScript); buffer.write32(id); buffer.write32(debugScript.bitmap); buffer.writeString(debugScript.name); buffer.writeString(debugScript.text); SupportClass.CollectionsSupport.Sort(debugScript.debugOffsets, null); System.Collections.IEnumerator debugOffsetIter = debugScript.debugOffsets.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (debugOffsetIter.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugOffset debugOffset = (DebugOffset)debugOffsetIter.Current; buffer.write32(flash.swf.DebugTags_Fields.kDebugOffset); buffer.write32(id); buffer.write32(debugOffset.lineNumber); buffer.write32(debugOffset.byteOffset); } } // Encode the kDebugRegister tags SupportClass.CollectionsSupport.Sort(debugRegisters, null); System.Collections.IEnumerator itr = debugRegisters.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (itr.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugRegisters debug = (DebugRegisters)itr.Current; int size = debug.registerNumbers.Length; buffer.write32(flash.swf.DebugTags_Fields.kDebugRegisters); buffer.write32(debug.offset); buffer.writeUI8(size); for (int i = 0; i < debug.registerNumbers.Length; i++) { buffer.writeUI8(debug.registerNumbers[i]); buffer.writeString(debug.variableNames[i]); } } // Encode the kDebugBreakpoint tags SupportClass.CollectionsSupport.Sort(debugBreakpoints, null); System.Collections.IEnumerator debugBreakpointIterator = debugBreakpoints.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" while (debugBreakpointIterator.MoveNext()) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" DebugBreakpoint debugBreakpoint = (DebugBreakpoint)debugBreakpointIterator.Current; buffer.write32(flash.swf.DebugTags_Fields.kDebugBreakpoint); buffer.write32(debugBreakpoint.offset); } }