private void InitBlock() { ExtUtil.writeNumeric(out_Renamed, attributes.size()); for (TreeElement e: attributes) { ExtUtil.write(out_Renamed, e.getNamespace()); ExtUtil.write(out_Renamed, e.getName()); ExtUtil.write(out_Renamed, e.getAttributeValue()); } int size = (int)ExtUtil.readNumeric(in_Renamed); List <TreeElement> attributes = new List <TreeElement>(); for (int i = 0; i < size; ++i) { System.String namespace_Renamed = ExtUtil.readString(in_Renamed); System.String name = ExtUtil.readString(in_Renamed); System.String value_Renamed = ExtUtil.readString(in_Renamed); TreeElement attr = TreeElement.constructAttributeElement(namespace_Renamed, name, value_Renamed); attr.setParent(parent); attributes.addElement(attr); } return(attributes); ExtUtil.stringCache = stringCache; }
//bad //UPGRADE_TODO: Class 'java.io.DataInputStream' was converted to 'System.IO.BinaryReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'" public static int[] readInts(System.IO.BinaryReader in_Renamed) { int size = (int)ExtUtil.readNumeric(in_Renamed); int[] ints = new int[size]; for (int i = 0; i < size; ++i) { ints[i] = (int)ExtUtil.readNumeric(in_Renamed); } return(ints); }
//UPGRADE_TODO: Class 'java.io.DataInputStream' was converted to 'System.IO.BinaryReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'" public override void readExternal(System.IO.BinaryReader in_Renamed, PrototypeFactory pf) { System.Collections.ArrayList v = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(0)); long size = ExtUtil.readNumeric(in_Renamed); for (int i = 0; i < size; i++) { v.Add(ExtUtil.read(in_Renamed, new ExtWrapTagged(), pf)); } val = v; }
//UPGRADE_TODO: Class 'java.io.DataInputStream' was converted to 'System.IO.BinaryReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'" public override void readExternal(System.IO.BinaryReader in_Renamed, PrototypeFactory pf) { if (type != TYPE_SLOW_READ_ONLY) { System.Collections.IDictionary h; long size = ExtUtil.readNumeric(in_Renamed); switch (type) { case (TYPE_NORMAL): //UPGRADE_TODO: Class 'java.util.HashMap' was converted to 'System.Collections.Hashtable' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilHashMap'" h = new System.Collections.Hashtable((int)size); break; case (TYPE_ORDERED): h = new OrderedMap(); break; case (TYPE_SLOW_COMPACT): h = (IDictionary)(new Map((int)size)); break; default: //UPGRADE_TODO: Class 'java.util.HashMap' was converted to 'System.Collections.Hashtable' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilHashMap'" h = new System.Collections.Hashtable((int)size); break; } for (int i = 0; i < size; i++) { System.Object key = ExtUtil.read(in_Renamed, keyType, pf); System.Object elem = ExtUtil.read(in_Renamed, dataType, pf); h[key] = elem; } val = h; } else { int size = ExtUtil.readInt(in_Renamed); ArrayList k = new ArrayList(size); ArrayList v = new ArrayList(size); for (int i = 0; i < size; i++) { k[i] = ExtUtil.read(in_Renamed, keyType, pf); v[i] = ExtUtil.read(in_Renamed, dataType, pf); } val = (IDictionary)(new Map(k, v)); } }
//UPGRADE_TODO: Class 'java.io.DataInputStream' was converted to 'System.IO.BinaryReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'" public static sbyte[] readBytes(System.IO.BinaryReader in_Renamed) { int size = (int)ExtUtil.readNumeric(in_Renamed); sbyte[] bytes = new sbyte[size]; int read = 0; int toread = size; while (read != size) { read = SupportClass.ReadInput(in_Renamed.BaseStream, bytes, 0, toread); toread -= read; } return(bytes); }
//UPGRADE_TODO: Class 'java.io.DataInputStream' was converted to 'System.IO.BinaryReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'" public static sbyte[] readBytes(System.IO.BinaryReader in_Renamed) { int size = (int)ExtUtil.readNumeric(in_Renamed); sbyte[] bytes = new sbyte[size]; int read = 0; int toread = size; while (read != size) { read = in_Renamed.Read((byte[])(Array)bytes, 0, toread); toread -= read; } return(bytes); }
//UPGRADE_TODO: Class 'java.io.DataInputStream' was converted to 'System.IO.BinaryReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'" public override void readExternal(System.IO.BinaryReader in_Renamed, PrototypeFactory pf) { //UPGRADE_TODO: Class 'java.util.HashMap' was converted to 'System.Collections.Hashtable' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilHashMap'" System.Collections.Hashtable h = ordered?new OrderedMap():new System.Collections.Hashtable(); long size = ExtUtil.readNumeric(in_Renamed); for (int i = 0; i < size; i++) { System.Object key = ExtUtil.read(in_Renamed, keyType, pf); System.Object elem = ExtUtil.read(in_Renamed, new ExtWrapTagged(), pf); h[key] = elem; } val = h; }
//UPGRADE_TODO: Class 'java.io.DataInputStream' was converted to 'System.IO.BinaryReader' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataInputStream'" public override void readExternal(System.IO.BinaryReader in_Renamed, PrototypeFactory pf) { if (!sealed_Renamed) { long size = ExtUtil.readNumeric(in_Renamed); System.Collections.ArrayList v = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(0)); for (int i = 0; i < size; i++) { v.Add(ExtUtil.read(in_Renamed, type, pf)); } val = v; } else { int size = (int)ExtUtil.readNumeric(in_Renamed); System.Object[] theval = new System.Object[size]; for (int i = 0; i < size; i++) { theval[i] = ExtUtil.read(in_Renamed, type, pf); } val = theval; } }