Revision 7178

View differences:

trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/DwgObject.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38
import java.util.ArrayList;
38 39

  
39 40
/**
40 41
 * The DwgObject class represents a DWG object
......
54 55
	protected int linetypeFlags;
55 56
	protected int plotstyleFlags;
56 57
	protected int sizeInBits;
57
	protected Vector extendedData;
58
	protected ArrayList extendedData;
58 59
	protected int graphicData;
59 60
	protected int subEntityHandle;
60 61
	protected int xDicObjHandle;
......
74 75
		Integer mode = (Integer)DwgUtil.getBits(data, 2, bitPos);
75 76
	    bitPos = bitPos + 2;
76 77
	    setMode(mode.intValue());
77
	    Vector v = DwgUtil.getBitLong(data, bitPos);
78
	    ArrayList v = DwgUtil.getBitLong(data, bitPos);
78 79
	    bitPos = ((Integer)v.get(0)).intValue();
79 80
	    int rnum = ((Integer)v.get(1)).intValue();
80 81
	    setNumReactors(rnum);
......
113 114
	 */
114 115
	public int readObjectTailV15(int[] data, int offset) throws Exception {
115 116
		int bitPos = offset;
116
		Vector v = null;
117
		ArrayList v = null;
117 118
		if (getMode()==0x0) {
118 119
			v = DwgUtil.getHandle(data, bitPos);
119 120
		    bitPos = ((Integer)v.get(0)).intValue();
......
121 122
		    for (int i=1;i<v.size();i++) {
122 123
			    sh[i-1] = ((Integer)v.get(i)).intValue();
123 124
		    }
124
		    Vector shv = new Vector();
125
		    ArrayList shv = new ArrayList();
125 126
		    for (int i=0;i<sh.length;i++) {
126 127
		    	shv.add(new Integer(sh[i]));
127 128
		    }
......
141 142
	    for (int i=1;i<v.size();i++) {
142 143
		    xh[i-1] = ((Integer)v.get(i)).intValue();
143 144
	    }
144
	    Vector xhv = new Vector();
145
	    ArrayList xhv = new ArrayList();
145 146
	    for (int i=0;i<xh.length;i++) {
146 147
	    	xhv.add(new Integer(xh[i]));
147 148
	    }
......
153 154
		    lh[i-1] = ((Integer)v.get(i)).intValue();
154 155
	    }
155 156
	    setLayerHandleCode(lh[0]);
156
	    Vector lhv = new Vector();
157
	    ArrayList lhv = new ArrayList();
157 158
	    for (int i=0;i<lh.length;i++) {
158 159
	    	lhv.add(new Integer(lh[i]));
159 160
	    }
......
210 211
	/**
211 212
	 * @return Returns the extendedData.
212 213
	 */
213
	public Vector getExtendedData() {
214
	public ArrayList getExtendedData() {
214 215
		return extendedData;
215 216
	}
216 217
	/**
217
	 * @param extendedData The extendedData to set.
218
	 * @param extData The extendedData to set.
218 219
	 */
219
	public void setExtendedData(Vector extendedData) {
220
		this.extendedData = extendedData;
220
	public void setExtendedData(ArrayList extData) {
221
		this.extendedData = extData;
221 222
	}
222 223
	/**
223 224
	 * @return Returns the graphicData.
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgSolid.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
64 64
	public void readDwgSolidV15(int[] data, int offset) throws Exception {
65 65
		int bitPos = offset;
66 66
		bitPos = readObjectHeaderV15(data, bitPos);
67
		Vector v = DwgUtil.testBit(data, bitPos);
67
		ArrayList v = DwgUtil.testBit(data, bitPos);
68 68
		bitPos = ((Integer)v.get(0)).intValue();
69 69
		boolean flag = ((Boolean)v.get(1)).booleanValue();
70 70
	    double val;
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgLayer.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.ArrayList;
37 38
import java.util.Vector;
38 39

  
39 40
import com.iver.cit.jdwglib.dwg.DwgObject;
......
66 67
	 */
67 68
	public void readDwgLayerV15(int[] data, int offset) throws Exception {
68 69
		int bitPos = offset;
69
		Vector v = DwgUtil.getBitLong(data, bitPos);
70
		ArrayList v = DwgUtil.getBitLong(data, bitPos);
70 71
		bitPos = ((Integer)v.get(0)).intValue();
71 72
		int numReactors = ((Integer)v.get(1)).intValue();
72 73
		setNumReactors(numReactors);
......
100 101
	    for (int j=1;j<v.size();j++) {
101 102
		    handle[j-1] = ((Integer)v.get(j)).intValue();
102 103
	    }
103
	    Vector handleVect = new Vector();
104
	    ArrayList handleVect = new ArrayList();
104 105
	    for (int i=0;i<handle.length;i++) {
105 106
	    	handleVect.add(new Integer(handle[i]));
106 107
	    }
......
125 126
	    for (int j=1;j<v.size();j++) {
126 127
		    handle[j-1] = ((Integer)v.get(j)).intValue();
127 128
	    }
128
	    handleVect = new Vector();
129
	    handleVect = new ArrayList();
129 130
	    for (int i=0;i<handle.length;i++) {
130 131
	    	handleVect.add(new Integer(handle[i]));
131 132
	    }
......
136 137
	    for (int j=1;j<v.size();j++) {
137 138
		    handle[j-1] = ((Integer)v.get(j)).intValue();
138 139
	    }
139
	    handleVect = new Vector();
140
	    handleVect = new ArrayList();
140 141
	    for (int i=0;i<handle.length;i++) {
141 142
	    	handleVect.add(new Integer(handle[i]));
142 143
	    }
......
147 148
	    for (int j=1;j<v.size();j++) {
148 149
		    handle[j-1] = ((Integer)v.get(j)).intValue();
149 150
	    }
150
	    handleVect = new Vector();
151
	    handleVect = new ArrayList();
151 152
	    for (int i=0;i<handle.length;i++) {
152 153
	    	handleVect.add(new Integer(handle[i]));
153 154
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgLinearDimension.java
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37 37
import java.awt.geom.Point2D;
38
import java.util.Vector;
38
import java.util.ArrayList;
39 39

  
40 40
import com.iver.cit.jdwglib.dwg.DwgObject;
41 41
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
79 79
	public void readDwgLinearDimensionV15(int[] data, int offset) throws Exception {
80 80
		int bitPos = offset;
81 81
		bitPos = readObjectHeaderV15(data, bitPos);
82
		Vector v = DwgUtil.getBitDouble(data, bitPos);
82
		ArrayList v = DwgUtil.getBitDouble(data, bitPos);
83 83
		bitPos = ((Integer)v.get(0)).intValue();
84 84
		double x = ((Double)v.get(1)).doubleValue();
85 85
		v = DwgUtil.getBitDouble(data, bitPos);
......
198 198
	    for (int i=1;i<v.size();i++) {
199 199
		    handle[i-1] = ((Integer)v.get(i)).intValue();
200 200
	    }
201
	    Vector handleVect = new Vector();
201
	    ArrayList handleVect = new ArrayList();
202 202
	    for (int i=0;i<handle.length;i++) {
203 203
	    	handleVect.add(new Integer(handle[i]));
204 204
	    }
......
209 209
	    for (int i=1;i<v.size();i++) {
210 210
		    handle[i-1] = ((Integer)v.get(i)).intValue();
211 211
	    }
212
	    handleVect = new Vector();
212
	    handleVect = new ArrayList();
213 213
	    for (int i=0;i<handle.length;i++) {
214 214
	    	handleVect.add(new Integer(handle[i]));
215 215
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgPolyline2D.java
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37 37
import java.awt.geom.Point2D;
38
import java.util.Vector;
38
import java.util.ArrayList;
39 39

  
40 40
import com.iver.cit.jdwglib.dwg.DwgObject;
41 41
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
71 71
		//System.out.println("readDwgPolyline2D executing ...");
72 72
		int bitPos = offset;
73 73
		bitPos = readObjectHeaderV15(data, bitPos);
74
		Vector v = DwgUtil.getBitShort(data, bitPos);
74
		ArrayList v = DwgUtil.getBitShort(data, bitPos);
75 75
		bitPos = ((Integer)v.get(0)).intValue();
76 76
		int flags = ((Integer)v.get(1)).intValue();
77 77
		this.flags = flags;
......
128 128
	    for (int i=1;i<v.size();i++) {
129 129
		    handle[i-1] = ((Integer)v.get(i)).intValue();
130 130
	    }
131
	    Vector handleVect = new Vector();
131
	    ArrayList handleVect = new ArrayList();
132 132
	    for (int i=0;i<handle.length;i++) {
133 133
	    	handleVect.add(new Integer(handle[i]));
134 134
	    }
......
139 139
	    for (int i=1;i<v.size();i++) {
140 140
		    handle[i-1] = ((Integer)v.get(i)).intValue();
141 141
	    }
142
	    handleVect = new Vector();
142
	    handleVect = new ArrayList();
143 143
	    for (int i=0;i<handle.length;i++) {
144 144
	    	handleVect.add(new Integer(handle[i]));
145 145
	    }
......
150 150
	    for (int i=1;i<v.size();i++) {
151 151
		    handle[i-1] = ((Integer)v.get(i)).intValue();
152 152
	    }
153
	    handleVect = new Vector();
153
	    handleVect = new ArrayList();
154 154
	    for (int i=0;i<handle.length;i++) {
155 155
	    	handleVect.add(new Integer(handle[i]));
156 156
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgPolyline3D.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
64 64
	public void readDwgPolyline3DV15(int[] data, int offset) throws Exception {
65 65
		int bitPos = offset;
66 66
		bitPos = readObjectHeaderV15(data, bitPos);
67
		Vector v = DwgUtil.getRawChar(data, bitPos);
67
		ArrayList v = DwgUtil.getRawChar(data, bitPos);
68 68
		bitPos = ((Integer)v.get(0)).intValue();
69 69
		int sflags = ((Integer)v.get(1)).intValue();
70 70
		splineFlags = sflags;
......
79 79
	    for (int i=1;i<v.size();i++) {
80 80
		    handle[i-1] = ((Integer)v.get(i)).intValue();
81 81
	    }
82
	    Vector handleVect = new Vector();
82
	    ArrayList handleVect = new ArrayList();
83 83
	    for (int i=0;i<handle.length;i++) {
84 84
	    	handleVect.add(new Integer(handle[i]));
85 85
	    }
......
90 90
	    for (int i=1;i<v.size();i++) {
91 91
		    handle[i-1] = ((Integer)v.get(i)).intValue();
92 92
	    }
93
	    handleVect = new Vector();
93
	    handleVect = new ArrayList();
94 94
	    for (int i=0;i<handle.length;i++) {
95 95
	    	handleVect.add(new Integer(handle[i]));
96 96
	    }
......
101 101
	    for (int i=1;i<v.size();i++) {
102 102
		    handle[i-1] = ((Integer)v.get(i)).intValue();
103 103
	    }
104
	    handleVect = new Vector();
104
	    handleVect = new ArrayList();
105 105
	    for (int i=0;i<handle.length;i++) {
106 106
	    	handleVect.add(new Integer(handle[i]));
107 107
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgText.java
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37 37
import java.awt.geom.Point2D;
38
import java.util.Vector;
38
import java.util.ArrayList;
39 39

  
40 40
import com.iver.cit.javacad.util.TextToUnicodeConverter;
41 41
import com.iver.cit.jdwglib.dwg.DwgObject;
......
73 73
	public void readDwgTextV15(int[] data, int offset) throws Exception {
74 74
		int bitPos = offset;
75 75
		bitPos = readObjectHeaderV15(data, bitPos);
76
		Vector v = DwgUtil.getRawChar(data, bitPos);
76
		ArrayList v = DwgUtil.getRawChar(data, bitPos);
77 77
		bitPos = ((Integer)v.get(0)).intValue();
78 78
		int dflag = ((Integer)v.get(1)).intValue();
79 79
		dataFlag = dflag;
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgAttrib.java
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37 37
import java.awt.geom.Point2D;
38
import java.util.ArrayList;
38 39
import java.util.Vector;
39 40

  
40 41
import com.iver.cit.jdwglib.dwg.DwgObject;
......
78 79
		//System.out.println("readDwgAttdef() executed ...");
79 80
		int bitPos = offset;
80 81
		bitPos = readObjectHeaderV15(data, bitPos);
81
		Vector v = DwgUtil.getRawChar(data, bitPos);
82
		ArrayList v = DwgUtil.getRawChar(data, bitPos);
82 83
		bitPos = ((Integer)v.get(0)).intValue();
83 84
		int dflag = ((Integer)v.get(1)).intValue();
84 85
		dataFlag = dflag;
......
199 200
	    for (int j=1;j<v.size();j++) {
200 201
		    handle[j-1] = ((Integer)v.get(j)).intValue();
201 202
	    }
202
		Vector handleVect = new Vector();
203
	    ArrayList handleVect = new ArrayList();
203 204
	    for (int i=0;i<handle.length;i++) {
204 205
	    	handleVect.add(new Integer(handle[i]));
205 206
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgLine.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
62 62
	public void readDwgLineV15(int[] data, int offset) throws Exception {
63 63
		int bitPos = offset;
64 64
		bitPos = readObjectHeaderV15(data, bitPos);
65
		Vector v = DwgUtil.testBit(data, bitPos);
65
		ArrayList v = DwgUtil.testBit(data, bitPos);
66 66
		bitPos = ((Integer)v.get(0)).intValue();
67 67
		zflag = ((Boolean)v.get(1)).booleanValue();
68 68
		v = DwgUtil.getRawDouble(data, bitPos);
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgPoint.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
61 61
	public void readDwgPointV15(int[] data, int offset) throws Exception {
62 62
		int bitPos = offset;
63 63
		bitPos = readObjectHeaderV15(data, bitPos);
64
		Vector v = DwgUtil.getBitDouble(data, bitPos);
64
		ArrayList v = DwgUtil.getBitDouble(data, bitPos);
65 65
		bitPos = ((Integer)v.get(0)).intValue();
66 66
		double x = ((Double)v.get(1)).doubleValue();
67 67
		v = DwgUtil.getBitDouble(data, bitPos);
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgSpline.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
71 71
	public void readDwgSplineV15(int[] data, int offset) throws Exception {
72 72
		int bitPos = offset;
73 73
		bitPos = readObjectHeaderV15(data, bitPos);
74
		Vector v = DwgUtil.getBitShort(data, bitPos);
74
		ArrayList v = DwgUtil.getBitShort(data, bitPos);
75 75
		bitPos = ((Integer)v.get(0)).intValue();
76 76
		int sc = ((Integer)v.get(1)).intValue();
77 77
		scenario = sc;
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgBlock.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.ArrayList;
37 38
import java.util.Vector;
38 39

  
39 40
import com.iver.cit.jdwglib.dwg.DwgObject;
......
58 59
	public void readDwgBlockV15(int[] data, int offset) throws Exception {
59 60
		int bitPos = offset;
60 61
		bitPos = readObjectHeaderV15(data, bitPos);
61
		Vector v = DwgUtil.getTextString(data, bitPos);
62
		ArrayList v = DwgUtil.getTextString(data, bitPos);
62 63
		bitPos = ((Integer)v.get(0)).intValue();
63 64
		String text = (String)v.get(1);
64 65
		name = text;
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgBlockControl.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.ArrayList;
37 38
import java.util.Vector;
38 39

  
39 40
import com.iver.cit.jdwglib.dwg.DwgObject;
......
61 62
	public void readDwgBlockControlV15(int[] data, int offset) throws Exception {
62 63
		//System.out.println("readDwgBlockControl() executed ...");
63 64
		int bitPos = offset;
64
		Vector v = DwgUtil.getBitLong(data, bitPos);
65
		ArrayList v = DwgUtil.getBitLong(data, bitPos);
65 66
		bitPos = ((Integer)v.get(0)).intValue();
66 67
		int numReactors = ((Integer)v.get(1)).intValue();
67 68
		setNumReactors(numReactors);
......
74 75
	    for (int i=1;i<v.size();i++) {
75 76
		    handle[i-1] = ((Integer)v.get(i)).intValue();
76 77
	    }
77
		Vector handleVect = new Vector();
78
		ArrayList handleVect = new ArrayList();
78 79
	    for (int i=0;i<handle.length;i++) {
79 80
	    	handleVect.add(new Integer(handle[i]));
80 81
	    }
......
104 105
	    for (int j=1;j<v.size();j++) {
105 106
		    handle[j-1] = ((Integer)v.get(j)).intValue();
106 107
	    }
107
	    handleVect = new Vector();
108
	    handleVect = new ArrayList();
108 109
	    for (int i=0;i<handle.length;i++) {
109 110
	    	handleVect.add(new Integer(handle[i]));
110 111
	    }
......
115 116
	    for (int j=1;j<v.size();j++) {
116 117
		    handle[j-1] = ((Integer)v.get(j)).intValue();
117 118
	    }
118
	    handleVect = new Vector();
119
	    handleVect = new ArrayList();
119 120
	    for (int i=0;i<handle.length;i++) {
120 121
	    	handleVect.add(new Integer(handle[i]));
121 122
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgEllipse.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.ArrayList;
37 38
import java.util.Vector;
38 39

  
39 40
import com.iver.cit.jdwglib.dwg.DwgObject;
......
63 64
	public void readDwgEllipseV15(int[] data, int offset) throws Exception {
64 65
		int bitPos = offset;
65 66
		bitPos = readObjectHeaderV15(data, bitPos);
66
		Vector v = DwgUtil.getBitDouble(data, bitPos);
67
		ArrayList v = DwgUtil.getBitDouble(data, bitPos);
67 68
		bitPos = ((Integer)v.get(0)).intValue();
68 69
		double x = ((Double)v.get(1)).doubleValue();
69 70
		v = DwgUtil.getBitDouble(data, bitPos);
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgLwPolyline.java
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37 37
import java.awt.geom.Point2D;
38
import java.util.Vector;
38
import java.util.ArrayList;
39 39

  
40 40
import com.iver.cit.jdwglib.dwg.DwgObject;
41 41
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
67 67
		//System.out.println("DwgLwPolyline.readDwgLwPolyline() executed ...");
68 68
		int bitPos = offset;
69 69
		bitPos = readObjectHeaderV15(data, bitPos);
70
		Vector v = DwgUtil.getBitShort(data, bitPos);
70
		ArrayList v = DwgUtil.getBitShort(data, bitPos);
71 71
		bitPos = ((Integer)v.get(0)).intValue();
72 72
		int flag = ((Integer)v.get(1)).intValue();
73 73
		this.flag = flag;
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgCircle.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.ArrayList;
37 38
import java.util.Vector;
38 39

  
39 40
import com.iver.cit.jdwglib.dwg.DwgObject;
......
61 62
	public void readDwgCircleV15(int[] data, int offset) throws Exception {
62 63
		int bitPos = offset;
63 64
		bitPos = readObjectHeaderV15(data, bitPos);
64
		Vector v = DwgUtil.getBitDouble(data, bitPos);
65
		ArrayList v = DwgUtil.getBitDouble(data, bitPos);
65 66
		bitPos = ((Integer)v.get(0)).intValue();
66 67
		double x = ((Double)v.get(1)).doubleValue();
67 68
		v = DwgUtil.getBitDouble(data, bitPos);
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgMText.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
70 70
	public void readDwgMTextV15(int[] data, int offset) throws Exception {
71 71
		int bitPos = offset;
72 72
		bitPos = readObjectHeaderV15(data, bitPos);
73
		Vector v = DwgUtil.getBitDouble(data, bitPos);
73
		ArrayList v = DwgUtil.getBitDouble(data, bitPos);
74 74
		bitPos = ((Integer)v.get(0)).intValue();
75 75
		double x = ((Double)v.get(1)).doubleValue();
76 76
		v = DwgUtil.getBitDouble(data, bitPos);
......
149 149
	    for (int j=1;j<v.size();j++) {
150 150
		    handle[j-1] = ((Integer)v.get(j)).intValue();
151 151
	    }
152
	    Vector handleVect = new Vector();
152
	    ArrayList handleVect = new ArrayList();
153 153
	    for (int i=0;i<handle.length;i++) {
154 154
	    	handleVect.add(new Integer(handle[i]));
155 155
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgBlockHeader.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.ArrayList;
37 38
import java.util.Vector;
38 39

  
39 40
import com.iver.cit.jdwglib.dwg.DwgObject;
......
84 85
	 */
85 86
	public void readDwgBlockHeaderV15(int[] data, int offset) throws Exception {
86 87
		int bitPos = offset;
87
		Vector v = DwgUtil.getBitLong(data, bitPos);
88
		ArrayList v = DwgUtil.getBitLong(data, bitPos);
88 89
		bitPos = ((Integer)v.get(0)).intValue();
89 90
		int numReactors = ((Integer)v.get(1)).intValue();
90 91
		setNumReactors(numReactors);
......
168 169
	    for (int j=1;j<v.size();j++) {
169 170
		    handle[j-1] = ((Integer)v.get(j)).intValue();
170 171
	    }
171
	    Vector handleVect = new Vector();
172
	    ArrayList handleVect = new ArrayList();
172 173
	    for (int i=0;i<handle.length;i++) {
173 174
	    	handleVect.add(new Integer(handle[i]));
174 175
	    }
......
193 194
	    for (int j=1;j<v.size();j++) {
194 195
		    handle[j-1] = ((Integer)v.get(j)).intValue();
195 196
	    }
196
	    handleVect = new Vector();
197
	    handleVect = new ArrayList();
197 198
	    for (int i=0;i<handle.length;i++) {
198 199
	    	handleVect.add(new Integer(handle[i]));
199 200
	    }
......
204 205
	    for (int j=1;j<v.size();j++) {
205 206
		    handle[j-1] = ((Integer)v.get(j)).intValue();
206 207
	    }
207
	    handleVect = new Vector();
208
	    handleVect = new ArrayList();
208 209
	    for (int i=0;i<handle.length;i++) {
209 210
	    	handleVect.add(new Integer(handle[i]));
210 211
	    }
......
216 217
		    for (int j=1;j<v.size();j++) {
217 218
			    handle[j-1] = ((Integer)v.get(j)).intValue();
218 219
		    }
219
		    handleVect = new Vector();
220
		    handleVect = new ArrayList();
220 221
		    for (int i=0;i<handle.length;i++) {
221 222
		    	handleVect.add(new Integer(handle[i]));
222 223
		    }
......
227 228
		    for (int j=1;j<v.size();j++) {
228 229
			    handle[j-1] = ((Integer)v.get(j)).intValue();
229 230
		    }
230
		    handleVect = new Vector();
231
		    handleVect = new ArrayList();
231 232
		    for (int i=0;i<handle.length;i++) {
232 233
		    	handleVect.add(new Integer(handle[i]));
233 234
		    }
......
239 240
	    for (int j=1;j<v.size();j++) {
240 241
		    handle[j-1] = ((Integer)v.get(j)).intValue();
241 242
	    }
242
	    handleVect = new Vector();
243
	    handleVect = new ArrayList();
243 244
	    for (int i=0;i<handle.length;i++) {
244 245
	    	handleVect.add(new Integer(handle[i]));
245 246
	    }
......
263 264
	    for (int j=1;j<v.size();j++) {
264 265
		    handle[j-1] = ((Integer)v.get(j)).intValue();
265 266
	    }
266
	    handleVect = new Vector();
267
	    handleVect = new ArrayList();
267 268
	    for (int i=0;i<handle.length;i++) {
268 269
	    	handleVect.add(new Integer(handle[i]));
269 270
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgVertex2D.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
64 64
		//System.out.println("readDwgVertex2D executing ...");
65 65
		int bitPos = offset;
66 66
		bitPos = readObjectHeaderV15(data, bitPos);
67
		Vector v = DwgUtil.getRawChar(data, bitPos);
67
		ArrayList v = DwgUtil.getRawChar(data, bitPos);
68 68
		bitPos = ((Integer)v.get(0)).intValue();
69 69
		int flags = ((Integer)v.get(1)).intValue();
70 70
		this.flags = flags;
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgInsert.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.ArrayList;
37 38
import java.util.Vector;
38 39

  
39 40
import com.iver.cit.jdwglib.dwg.DwgObject;
......
66 67
		//System.out.println("readDwgInsert() executed ...");
67 68
		int bitPos = offset;
68 69
		bitPos = readObjectHeaderV15(data, bitPos);
69
		Vector v = DwgUtil.getBitDouble(data, bitPos);
70
		ArrayList v = DwgUtil.getBitDouble(data, bitPos);
70 71
		bitPos = ((Integer)v.get(0)).intValue();
71 72
		double x = ((Double)v.get(1)).doubleValue();
72 73
		v = DwgUtil.getBitDouble(data, bitPos);
......
135 136
	    for (int i=1;i<v.size();i++) {
136 137
		    handle[i-1] = ((Integer)v.get(i)).intValue();
137 138
	    }
138
	    Vector handleVect = new Vector();
139
	    ArrayList handleVect = new ArrayList();
139 140
	    for (int i=0;i<handle.length;i++) {
140 141
	    	handleVect.add(new Integer(handle[i]));
141 142
	    }
......
147 148
		    for (int i=1;i<v.size();i++) {
148 149
			    handle[i-1] = ((Integer)v.get(i)).intValue();
149 150
		    }
150
		    handleVect = new Vector();
151
		    handleVect = new ArrayList();
151 152
		    for (int i=0;i<handle.length;i++) {
152 153
		    	handleVect.add(new Integer(handle[i]));
153 154
		    }
......
158 159
		    for (int i=1;i<v.size();i++) {
159 160
			    handle[i-1] = ((Integer)v.get(i)).intValue();
160 161
		    }
161
		    handleVect = new Vector();
162
		    handleVect = new ArrayList();
162 163
		    for (int i=0;i<handle.length;i++) {
163 164
		    	handleVect.add(new Integer(handle[i]));
164 165
		    }
......
169 170
		    for (int i=1;i<v.size();i++) {
170 171
			    handle[i-1] = ((Integer)v.get(i)).intValue();
171 172
		    }
172
		    handleVect = new Vector();
173
		    handleVect = new ArrayList();
173 174
		    for (int i=0;i<handle.length;i++) {
174 175
		    	handleVect.add(new Integer(handle[i]));
175 176
		    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgVertex3D.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
59 59
	public void readDwgVertex3DV15(int[] data, int offset) throws Exception {
60 60
		int bitPos = offset;
61 61
		bitPos = readObjectHeaderV15(data, bitPos);
62
		Vector v = DwgUtil.getRawChar(data, bitPos);
62
		ArrayList v = DwgUtil.getRawChar(data, bitPos);
63 63
		bitPos = ((Integer)v.get(0)).intValue();
64 64
		int flags = ((Integer)v.get(1)).intValue();
65 65
		this.flags = flags;
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgArc.java
34 34
 */
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37
import java.util.Vector;
37
import java.util.ArrayList;
38 38

  
39 39
import com.iver.cit.jdwglib.dwg.DwgObject;
40 40
import com.iver.cit.jdwglib.dwg.DwgUtil;
......
64 64
		//System.out.println("readDwgArc() executed ...");
65 65
		int bitPos = offset;
66 66
		bitPos = readObjectHeaderV15(data, bitPos);
67
		Vector v = DwgUtil.getBitDouble(data, bitPos);
67
		ArrayList v = DwgUtil.getBitDouble(data, bitPos);
68 68
		bitPos = ((Integer)v.get(0)).intValue();
69 69
		double x = ((Double)v.get(1)).doubleValue();
70 70
		v = DwgUtil.getBitDouble(data, bitPos);
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgAttdef.java
35 35
package com.iver.cit.jdwglib.dwg.objects;
36 36

  
37 37
import java.awt.geom.Point2D;
38
import java.util.ArrayList;
38 39
import java.util.Vector;
39 40

  
40 41
import com.iver.cit.jdwglib.dwg.DwgObject;
......
78 79
		//System.out.println("readDwgAttdef() executed ...");
79 80
		int bitPos = offset;
80 81
		bitPos = readObjectHeaderV15(data, bitPos);
81
		Vector v = DwgUtil.getRawChar(data, bitPos);
82
		ArrayList v = DwgUtil.getRawChar(data, bitPos);
82 83
		bitPos = ((Integer)v.get(0)).intValue();
83 84
		int dflag = ((Integer)v.get(1)).intValue();
84 85
		dataFlag = dflag;
......
203 204
	    for (int j=1;j<v.size();j++) {
204 205
		    handle[j-1] = ((Integer)v.get(j)).intValue();
205 206
	    }
206
	    Vector handleVect = new Vector();
207
	    ArrayList handleVect = new ArrayList();
207 208
	    for (int i=0;i<handle.length;i++) {
208 209
	    	handleVect.add(new Integer(handle[i]));
209 210
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/DwgUtil.java
36 36

  
37 37
import java.nio.ByteBuffer;
38 38
import java.nio.ByteOrder;
39
import java.util.Vector;
39
import java.util.ArrayList;
40
import java.util.ArrayList;
40 41

  
41 42
import com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils;
42 43

  
......
58 59
	 * @param offset The current bit offset where the value begins
59 60
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
60 61
	 * 		   when we are looking for LwPolylines.
61
	 * @return Vector This vector has two parts. First is an int value that represents
62
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
62 63
	 * 		   the new offset, and second is the extended data of a DWG object 
63 64
	 */
64
	public static Vector readExtendedData(int[] data, int offset) throws Exception {
65
	public static ArrayList readExtendedData(int[] data, int offset) throws Exception {
65 66
		int bitPos = offset;
66
		Vector extData = new Vector();
67
		ArrayList extData = new ArrayList();
67 68
		while (true) {
68 69
			int newBitPos = ((Integer)getBitShort(data, bitPos).get(0)).intValue();
69 70
			int size = ((Integer)getBitShort(data, bitPos).get(1)).intValue();
......
71 72
			if (size==0) {
72 73
				break;
73 74
			}
74
			newBitPos = ((Integer)((Vector)getHandle(data, bitPos)).get(0)).intValue();
75
			newBitPos = ((Integer)((ArrayList)getHandle(data, bitPos)).get(0)).intValue();
75 76
			// TODO: Esto no es correcto. Repasar ...
76
			int handle = ((Integer)((Vector)getHandle(data, bitPos)).get(1)).intValue();
77
			int handle = ((Integer)((ArrayList)getHandle(data, bitPos)).get(1)).intValue();
77 78
			bitPos = newBitPos;
78
			Vector eedata = new Vector();
79
			ArrayList eedata = new ArrayList();
79 80
			while (size>0) {
80 81
				newBitPos = ((Integer)getRawChar(data, bitPos).get(0)).intValue();
81 82
				int cb = ((Integer)getRawChar(data, bitPos).get(1)).intValue();
......
88 89
					newBitPos = ((Integer)getRawShort(data, bitPos).get(0)).intValue();
89 90
					int cp = ((Integer)getRawShort(data, bitPos).get(1)).intValue();
90 91
					bitPos = newBitPos;
91
					Vector chars = new Vector();
92
					ArrayList chars = new ArrayList();
92 93
					for (int i=0; i<len; i++) {
93 94
						newBitPos = ((Integer)getRawChar(data, bitPos).get(0)).intValue();
94 95
						int charr = ((Integer)getRawChar(data, bitPos).get(1)).intValue();
......
114 115
					}
115 116
					size = size - 1;
116 117
				} else if (cb==0x3 || cb==0x5) {
117
					Vector chars = new Vector();
118
					ArrayList chars = new ArrayList();
118 119
					for (int i=0; i<8; i++) {
119 120
						newBitPos = ((Integer)getRawChar(data, bitPos).get(0)).intValue();
120 121
						int charr = ((Integer)getRawChar(data, bitPos).get(1)).intValue();
......
127 128
					newBitPos = ((Integer)getRawChar(data, bitPos).get(0)).intValue();
128 129
					int len = ((Integer)getRawChar(data, bitPos).get(1)).intValue();
129 130
					bitPos = newBitPos;
130
					Vector chars = new Vector();
131
					ArrayList chars = new ArrayList();
131 132
					for (int i=0; i<len; i++) {
132 133
						newBitPos = ((Integer)getRawChar(data, bitPos).get(0)).intValue();
133 134
						int charr = ((Integer)getRawChar(data, bitPos).get(1)).intValue();
......
137 138
					eedata.add(chars);
138 139
					size = size - len -1;
139 140
				} else if (0xa<=cb && cb<=0xd) {
140
					newBitPos = ((Integer)((Vector)getRawDouble(data, bitPos)).get(0)).intValue();
141
					double d1 = ((Double)((Vector)getRawDouble(data, bitPos)).get(1)).doubleValue();
141
					newBitPos = ((Integer)((ArrayList)getRawDouble(data, bitPos)).get(0)).intValue();
142
					double d1 = ((Double)((ArrayList)getRawDouble(data, bitPos)).get(1)).doubleValue();
142 143
					bitPos = newBitPos;
143
					newBitPos = ((Integer)((Vector)getRawDouble(data, bitPos)).get(0)).intValue();
144
					double d2 = ((Double)((Vector)getRawDouble(data, bitPos)).get(1)).doubleValue();
144
					newBitPos = ((Integer)((ArrayList)getRawDouble(data, bitPos)).get(0)).intValue();
145
					double d2 = ((Double)((ArrayList)getRawDouble(data, bitPos)).get(1)).doubleValue();
145 146
					bitPos = newBitPos;
146
					newBitPos = ((Integer)((Vector)getRawDouble(data, bitPos)).get(0)).intValue();
147
					double d3 = ((Double)((Vector)getRawDouble(data, bitPos)).get(1)).doubleValue();
147
					newBitPos = ((Integer)((ArrayList)getRawDouble(data, bitPos)).get(0)).intValue();
148
					double d3 = ((Double)((ArrayList)getRawDouble(data, bitPos)).get(1)).doubleValue();
148 149
					bitPos = newBitPos;
149 150
					eedata.add(new double[]{d1, d2, d3});
150 151
					size = size - 24;
151 152
				} else if (0x28<=cb && cb<=0x2a) {
152
					newBitPos = ((Integer)((Vector)getRawDouble(data, bitPos)).get(0)).intValue();
153
					double d = ((Double)((Vector)getRawDouble(data, bitPos)).get(1)).doubleValue();
153
					newBitPos = ((Integer)((ArrayList)getRawDouble(data, bitPos)).get(0)).intValue();
154
					double d = ((Double)((ArrayList)getRawDouble(data, bitPos)).get(1)).doubleValue();
154 155
					bitPos = newBitPos;
155 156
					eedata.add(new Double(d));
156 157
					size=size-8;
......
170 171
					System.out.println("Unexpected code byte: " + cb);
171 172
				}
172 173
			}
173
			Vector v = new Vector();
174
			ArrayList v = new ArrayList();
174 175
			//v.add(handle, eedata);
175 176
			extData.add(v);
176 177
		}
177
		Vector v = new Vector();
178
		ArrayList v = new ArrayList();
178 179
		v.add(new Integer(bitPos));
179 180
		v.add(extData);
180 181
		return v;
......
187 188
	 * @param defVal Default double value
188 189
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
189 190
	 * 		   when we are looking for LwPolylines.
190
	 * @return Vector This vector has two parts. First is an int value that represents
191
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
191 192
	 * 		   the new offset, and second is the double value
192 193
	 */
193
	public static Vector getDefaultDouble(int[] data, int offset, double defVal) throws Exception {
194
	public static ArrayList getDefaultDouble(int[] data, int offset, double defVal) throws Exception {
194 195
    	int flags = ((Integer)getBits(data, 2, offset)).intValue();
195 196
    	int read = 2;
196 197
    	double val;
......
248 249
    			val = bb.getDouble();
249 250
    		}
250 251
    	}
251
    	Vector v = new Vector();
252
    	ArrayList v = new ArrayList();
252 253
		v.add(new Integer(offset+read));
253 254
		v.add(new Double(val));
254 255
		return v;
......
260 261
	 * @param offset The current bit offset where the value begins
261 262
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
262 263
	 * 		   when we are looking for LwPolylines.
263
	 * @return Vector This vector has two parts. First is an int value that represents
264
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
264 265
	 * 		   the new offset, and second is the double value
265 266
	 */
266
	public static Vector getBitDouble(int[] data, int offset) throws Exception {
267
		Vector v = new Vector();
267
	public static ArrayList getBitDouble(int[] data, int offset) throws Exception {
268
		ArrayList v = new ArrayList();
268 269
		int type = ((Integer)getBits(data, 2, offset)).intValue();
269 270
		int read = 2;
270 271
		double val = 0.0;
......
292 293
	 * @param offset The current bit offset where the value begins
293 294
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
294 295
	 * 		   when we are looking for LwPolylines.
295
	 * @return Vector This vector has two parts. First is an int value that represents
296
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
296 297
	 * 		   the new offset, and second is the double value
297 298
	 */
298
	public static Vector getRawDouble(int[] data, int offset) throws Exception {
299
	public static ArrayList getRawDouble(int[] data, int offset) throws Exception {
299 300
    	byte[] bytes = (byte[])getBits(data, 64, offset);
300 301
		ByteBuffer bb = ByteBuffer.wrap(bytes);
301 302
		bb.order(ByteOrder.LITTLE_ENDIAN);
302 303
		double val = bb.getDouble();
303
		Vector v = new Vector();
304
		ArrayList v = new ArrayList();
304 305
		v.add(new Integer(offset+64));
305 306
		v.add(new Double(val));
306 307
		return v;
......
312 313
	 * @param offset The current bit offset where the value begins
313 314
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
314 315
	 * 		   when we are looking for LwPolylines.
315
	 * @return Vector This vector has two parts. First is an int value that represents
316
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
316 317
	 * 		   the new offset, and second is the short value
317 318
	 */
318
	public static Vector getBitShort(int[] data, int offset) throws Exception {
319
		Vector v = new Vector();
319
	public static ArrayList getBitShort(int[] data, int offset) throws Exception {
320
		ArrayList v = new ArrayList();
320 321
		int type = ((Integer)getBits(data, 2, offset)).intValue();
321 322
		int read = 2;
322 323
		int val = 0;
......
345 346
	 * @param offset The current bit offset where the value begins
346 347
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
347 348
	 * 		   when we are looking for LwPolylines.
348
	 * @return Vector This vector has two parts. First is an int value that represents
349
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
349 350
	 * 		   the new offset, and second is the short value
350 351
	 */
351
	public static Vector getRawShort(int[] data, int offset) throws Exception {
352
	public static ArrayList getRawShort(int[] data, int offset) throws Exception {
352 353
		byte[] bytes = (byte[])getBits(data, 16, offset);
353 354
		ByteBuffer bb = ByteBuffer.wrap(bytes);
354 355
		bb.order(ByteOrder.LITTLE_ENDIAN);
355 356
		int val = bb.getShort();
356
		Vector v = new Vector();
357
		ArrayList v = new ArrayList();
357 358
		v.add(new Integer(offset+16));
358 359
		v.add(new Integer(val));
359 360
		return v;
......
365 366
	 * @param offset The current bit offset where the value begins
366 367
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
367 368
	 * 		   when we are looking for LwPolylines.
368
	 * @return Vector This vector has two parts. First is an int value that represents
369
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
369 370
	 * 		   the new offset, and second is the long value
370 371
	 */
371
	public static Vector getBitLong(int[] data, int offset) throws Exception {
372
	public static ArrayList getBitLong(int[] data, int offset) throws Exception {
372 373
    	int type = ((Integer)getBits(data, 2, offset)).intValue();
373 374
    	int read = 2;
374 375
    	int val = 0;
......
386 387
    	} else {
387 388
			System.out.println("Bad type at bit offset: " + offset);
388 389
    	}
389
    	Vector v = new Vector();
390
    	ArrayList v = new ArrayList();
390 391
    	v.add(new Integer(offset+read));
391 392
    	v.add(new Integer(val));
392 393
    	return v;
......
398 399
	 * @param offset The current bit offset where the value begins
399 400
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
400 401
	 * 		   when we are looking for LwPolylines.
401
	 * @return Vector This vector has two parts. First is an int value that represents
402
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
402 403
	 * 		   the new offset, and second is the long value
403 404
	 */
404
	public static Vector getRawLong(int[] data, int offset) {
405
		Vector v = new Vector();
405
	public static ArrayList getRawLong(int[] data, int offset) {
406
		ArrayList v = new ArrayList();
406 407
		// TODO: Incorrecto. Repasar ...
407 408
	    // _val = struct.unpack('<l', _long)[0]
408 409
		int val = 0;
......
417 418
	 * @param offset The current bit offset where the value begins
418 419
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
419 420
	 * 		   when we are looking for LwPolylines.
420
	 * @return Vector This vector has two parts. First is an int value that represents
421
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
421 422
	 * 		   the new offset, and second is the char value
422 423
	 */
423
	public static Vector getRawChar(int[] data, int offset) throws Exception {
424
	public static ArrayList getRawChar(int[] data, int offset) throws Exception {
424 425
		int charr = ((Integer)getBits(data, 8, offset)).intValue();
425
    	Vector v = new Vector();
426
    	ArrayList v = new ArrayList();
426 427
    	v.add(new Integer(offset+8));
427 428
    	v.add(new Integer(charr));
428 429
		return v;
......
434 435
	 * @param offset The current bit offset where the value begins
435 436
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
436 437
	 * 		   when we are looking for LwPolylines.
437
	 * @return Vector This vector has two parts. First is an int value that represents
438
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
438 439
	 * 		   the new offset, and second is the char value
439 440
	 */
440
	public static Vector getModularChar(int[] data, int offset) throws Exception {
441
	public static ArrayList getModularChar(int[] data, int offset) throws Exception {
441 442
		int val=0;
442
		Vector bytes = new Vector();
443
		ArrayList bytes = new ArrayList();
443 444
		boolean read = true;
444 445
		int offsett = offset;
445 446
		int fac = 1;
......
460 461
		else if (bytes.size()==3) val = ((Integer)bytes.get(0)).intValue() | (((Integer)bytes.get(1)).intValue() << 7) | (((Integer)bytes.get(2)).intValue() << 14);
461 462
		else if (bytes.size()==4) val = ((Integer)bytes.get(0)).intValue() | (((Integer)bytes.get(1)).intValue() << 7) | (((Integer)bytes.get(2)).intValue() << 14) | (((Integer)bytes.get(3)).intValue() << 21);
462 463
		else System.out.println("Unexpected byte array length: " + bytes.size());
463
		Vector v = new Vector();
464
		ArrayList v = new ArrayList();
464 465
		v.add(new Integer(offsett));
465 466
		v.add(new Integer(fac*val));
466 467
		return v;
......
472 473
	 * @param offset The current bit offset where the value begins
473 474
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
474 475
	 * 		   when we are looking for LwPolylines.
475
	 * @return Vector This vector has two parts. First is an int value that represents
476
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
476 477
	 * 		   the new offset, and second is the String
477 478
	 */
478
	public static Vector getTextString(int[] data, int offset) throws Exception {
479
	public static ArrayList getTextString(int[] data, int offset) throws Exception {
479 480
		int bitPos = offset;
480 481
	    int newBitPos = ((Integer)DwgUtil.getBitShort(data, bitPos).get(0)).intValue();
481 482
	    int len = ((Integer)DwgUtil.getBitShort(data, bitPos).get(1)).intValue();
......
491 492
	    	string = new String((byte[])bytes);
492 493
	    }
493 494
	    bitPos = bitPos + bitLen;
494
	    Vector v = new Vector();
495
	    ArrayList v = new ArrayList();
495 496
	    v.add(new Integer(bitPos));
496 497
	    v.add(string);
497 498
	    return v;
......
503 504
	 * @param offset The current bit offset where the value begins
504 505
	 * @throws Exception If an unexpected bit value is found in the DWG file. Occurs
505 506
	 * 		   when we are looking for LwPolylines.
506
	 * @return Vector This vector has two parts. First is an int value that represents
507
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
507 508
	 * 		   the new offset, and second is the int value (handle of a DWG object)
508 509
	 */
509
	public static Vector getHandle(int[] data, int offset) throws Exception {
510
		Vector v = new Vector();
510
	public static ArrayList getHandle(int[] data, int offset) throws Exception {
511
		ArrayList v = new ArrayList();
511 512
		int code = ((Integer)DwgUtil.getBits(data, 4, offset)).intValue();
512 513
	    int counter = ((Integer)DwgUtil.getBits(data, 4, (offset + 4))).intValue();
513 514
	    int read = 8;
514
	    Vector hlist = new Vector();
515
	    ArrayList hlist = new ArrayList();
515 516
	    if (counter>0) {
516 517
	        int hlen = counter * 8;
517 518
	        Object handle = DwgUtil.getBits(data, hlen, (offset + 8));
......
545 546
	 * @return int Size of the modular short
546 547
	 */
547 548
	public static int getModularShort(ByteBuffer bb) {
548
		Vector shorts = new Vector();
549
		ArrayList shorts = new ArrayList();
549 550
		bb.order(ByteOrder.BIG_ENDIAN);
550 551
		short shortt = bb.getShort();
551 552
		int size = 0;
......
608 609
		int read = 0;
609 610
		int rem = count;
610 611
		int bytee = 0x0;
611
		Vector bytes = new Vector();
612
		ArrayList bytes = new ArrayList();
612 613
		while (read < count) {
613 614
			int b1 = 0;
614 615
			if (rem > binc) {
......
654 655
	 * 
655 656
	 * @param data Array of unsigned bytes obtained from the DWG binary file
656 657
	 * @param offset The current bit offset where the value begins
657
	 * @return Vector This vector has two parts. First is an int value that represents
658
	 * @return ArrayList This ArrayList has two parts. First is an int value that represents
658 659
	 * 		   the new offset, and second is a bit flag
659 660
	 */
660
	public static Vector testBit(int[] data, int offset) {
661
	public static ArrayList testBit(int[] data, int offset) {
661 662
		int idx = offset/8;
662 663
		int bitidx = offset%8;
663 664
		int mask = 0x1 << (7-bitidx);
664 665
		boolean val = false;
665 666
		if ((data[idx] & mask) > 0) val = true;
666
		Vector v = new Vector();
667
		ArrayList v = new ArrayList();
667 668
		v.add(new Integer(offset+1));
668 669
		v.add(new Boolean(val));
669 670
		return v;
......
690 691
	 * @param layerHandle Handle in binary format
691 692
	 * @return int Int value of the handle
692 693
	 */
693
	public static int handleBinToHandleInt(Vector layerHandle) {
694
	public static int handleBinToHandleInt(ArrayList layerHandle) {
694 695
		byte[] layerBytes = new byte[]{0,0,0,0};
695 696
		if (layerHandle.size()>2) layerBytes[3] = (byte)((Integer)layerHandle.get(2)).intValue();
696 697
		if (layerHandle.size()>3) {
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/DwgFileV15Reader.java
40 40
import java.nio.ByteBuffer;
41 41
import java.nio.ByteOrder;
42 42
import java.nio.channels.FileChannel;
43
import java.util.Vector;
43
import java.util.ArrayList;
44 44

  
45 45
import com.iver.cit.jdwglib.dwg.objects.DwgArc;
46 46
import com.iver.cit.jdwglib.dwg.objects.DwgAttdef;
......
87 87
     * @throws IOException When DWG file path is wrong
88 88
	 */
89 89
	public void read(DwgFile dwgFile) throws IOException {
90
		System.out.println("DwgFileV15Reader.read() executed ...");
90
//		System.out.println("DwgFileV15Reader.read() executed ...");
91 91
		this.dwgFile = dwgFile;
92 92
		File f = new File(dwgFile.getFileName());
93 93
		FileInputStream fis = new FileInputStream(f);
......
96 96
		ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, s);
97 97
		readDwgSectionOffsets(bb);
98 98
		try {
99
			long t0 = System.currentTimeMillis();
99 100
			readDwgObjectOffsets(bb);
101
			long t1 = System.currentTimeMillis();
102
System.out.println((t1-t0)+" en leer los objects offsets");			
100 103
			//readDwgClasses(bb);
101 104
		} catch (Exception e) {
102
		    System.out.println("Error leyendo offsets y classes. Posible corrupci�n en" +
103
		    		"el DWG file ...");
105
//		    System.out.println("Error leyendo offsets y classes. Posible corrupci�n en" +
106
//		    		"el DWG file ...");
104 107
		}
105
		long t1 = System.currentTimeMillis();
108
		long t2 = System.currentTimeMillis();
106 109
		readDwgObjects(bb);
107
		long t2 = System.currentTimeMillis();
108
		System.out.println("Tiempo empleado por readDwgObjects() = " + (t2-t1));
110
		long t3 = System.currentTimeMillis();
111
System.out.println((t3-t2)+" en leer los dwg objects");		
109 112
	}
110 113
	
111 114
	protected void readDwgSectionOffsets(ByteBuffer bb) {
......
130 133
			} else if (rec==5) {
131 134
				dwgFile.addDwgSectionOffset("R14REC5", seek, size);
132 135
			} else {
133
				System.out.println("ERROR: C�digo de n�mero de registro no soportado: " + rec);
136
//				System.out.println("ERROR: C�digo de n�mero de registro no soportado: " + rec);
134 137
			}
135 138
		}
136 139
	}
......
152 155
			int bitPos=0;
153 156
			int bitMax=(size-2)*8;
154 157
			while (bitPos<bitMax) {
155
				Vector v = DwgUtil.getModularChar(data, bitPos);
158
				ArrayList v = DwgUtil.getModularChar(data, bitPos);
156 159
				bitPos = ((Integer)v.get(0)).intValue();
157 160
				lastHandle = lastHandle + ((Integer)v.get(1)).intValue();
158 161
				v = DwgUtil.getModularChar(data, bitPos);
......
180 183
		int maxbit = size * 8;
181 184
		int bitPos = 0;
182 185
		while ((bitPos+8) < maxbit) {
183
			Vector v = DwgUtil.getBitShort(data, bitPos);
186
			ArrayList v = DwgUtil.getBitShort(data, bitPos);
184 187
			bitPos = ((Integer)v.get(0)).intValue();
185 188
			v = DwgUtil.getBitShort(data, bitPos);
186 189
			bitPos = ((Integer)v.get(0)).intValue();
......
224 227
				data[i] = ByteUtils.getUnsigned((byte)data[i]);
225 228
			}
226 229
			int bitPos = 0;
227
			Vector v = DwgUtil.getBitShort(data, bitPos);
230
			ArrayList v = DwgUtil.getBitShort(data, bitPos);
228 231
			bitPos = ((Integer)v.get(0)).intValue();
229 232
			int type = ((Integer)v.get(1)).intValue();
230 233
			//System.out.println("type = " + type);
......
333 336
		    bitPos = ((Integer)v.get(0)).intValue();
334 337
		    int objBSize = ((Integer)v.get(1)).intValue();
335 338
		    obj.setSizeInBits(objBSize);
336
		    Vector entityHandle = new Vector();
339
		    ArrayList entityHandle = new ArrayList();
337 340
		    v = DwgUtil.getHandle(data, bitPos);
338 341
		    bitPos = ((Integer)v.get(0)).intValue();
339 342
		    for (int i=1;i<v.size();i++) {
......
342 345
		    obj.setHandle(DwgUtil.handleBinToHandleInt(entityHandle));
343 346
		    v = DwgUtil.readExtendedData(data, bitPos);
344 347
		    bitPos = ((Integer)v.get(0)).intValue();
345
		    Vector extData = (Vector)v.get(1);
348
		    ArrayList extData = (ArrayList)v.get(1);
346 349
		    obj.setExtendedData(extData);
347 350
		    
348 351
		    boolean gflag = false;
......
364 367
			readSpecificObject(obj, data, bitPos);
365 368
		    return obj;
366 369
	    } catch (Exception e) {
367
	        System.out.println("Exception capturada. Probablemente se ha encontrado un" +
368
	        		"objeto con type non fixed");
370
//	        System.out.println("Exception capturada. Probablemente se ha encontrado un" +
371
//	        		"objeto con type non fixed");
369 372
	        //e.printStackTrace();
370 373
	        return null;
371 374
	    }
trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/DwgFile.java
41 41
import java.nio.ByteBuffer;
42 42
import java.nio.channels.FileChannel;
43 43
import java.util.HashMap;
44
import java.util.Vector;
44
//import java.util.Vector;
45
import java.util.ArrayList;
45 46

  
46 47
import com.iver.cit.javacad.util.AcadExtrusionCalculator;
47 48
import com.iver.cit.javacad.util.GisModelCurveCalculator;
......
109 110

  
110 111
	private String fileName;
111 112
	private String dwgVersion;
112
	private Vector dwgSectionOffsets;
113
	private Vector dwgObjectOffsets;
114
	private Vector dwgObjects;
115
	private Vector dwgClasses;
113
	private ArrayList dwgSectionOffsets;
114
	private ArrayList dwgObjectOffsets;
115
	private ArrayList dwgObjects;
116
	private ArrayList dwgClasses;
116 117
	private DwgFileReader dwgReader;
117
	private Vector layerTable;
118
	private ArrayList layerTable;
118 119
	private boolean dwg3DFile;
119 120
	
120 121
	/**
......
125 126
	 */
126 127
	public DwgFile(String fileName) {
127 128
		this.fileName = fileName;
128
		dwgSectionOffsets = new Vector();
129
		dwgObjectOffsets = new Vector();
130
		dwgObjects = new Vector();
131
		dwgClasses = new Vector();
129
		dwgSectionOffsets = new ArrayList();
130
		dwgObjectOffsets = new ArrayList();
131
		dwgObjects = new ArrayList();
132
		dwgClasses = new ArrayList();
132 133
	}
133 134
	
134 135
	/**
......
309 310
				int flags = ((DwgPolyline2D)pol).getFlags();
310 311
				int firstHandle = ((DwgPolyline2D)pol).getFirstVertexHandle();
311 312
				int lastHandle = ((DwgPolyline2D)pol).getLastVertexHandle();
312
				Vector pts = new Vector();
313
				Vector bulges = new Vector();
313
				ArrayList pts = new ArrayList();
314
				ArrayList bulges = new ArrayList();
314 315
				double[] pt = new double[3];
315 316
				for (int j=0;j<dwgObjects.size();j++) {
316 317
					DwgObject firstVertex = (DwgObject)dwgObjects.get(j);
......
363 364
					Point2D[] points = GisModelCurveCalculator.calculateGisModelBulge(newPts, bs);
364 365
					((DwgPolyline2D)pol).setPts(points);
365 366
				} else {
366
					System.out.println("Encontrada polil?nea sin puntos ...");
367
//					System.out.println("Encontrada polil?nea sin puntos ...");
367 368
					// TODO: No se debe mandar nunca una polil?nea sin puntos, si esto
368 369
					// ocurre es porque existe un error que hay que corregir ...
369 370
				}
......
371 372
				int closedFlags = ((DwgPolyline3D)pol).getClosedFlags();
372 373
				int firstHandle = ((DwgPolyline3D)pol).getFirstVertexHandle();
373 374
				int lastHandle = ((DwgPolyline3D)pol).getLastVertexHandle();
374
				Vector pts = new Vector();
375
				ArrayList pts = new ArrayList();
375 376
				double[] pt = new double[3];
376 377
				for (int j=0;j<dwgObjects.size();j++) {
377 378
					DwgObject firstVertex = (DwgObject)dwgObjects.get(j);
......
417 418
					}
418 419
					((DwgPolyline3D)pol).setPts(newPts);
419 420
				} else {
420
					System.out.println("Encontrada polil?nea sin puntos ...");
421
//					System.out.println("Encontrada polil?nea sin puntos ...");
421 422
					// TODO: No se debe mandar nunca una polil?nea sin puntos, si esto
422 423
					// ocurre es porque existe un error que hay que corregir ...
423 424
				}
......
428 429
				Point2D[] newPts = new Point2D[pts.length];
429 430
				double[] newBulges = new double[bulges.length];
430 431
				// TODO: Aqu? pueden existir casos no contemplados ...
431
                System.out.println("flags = " + flags);
432
//                System.out.println("flags = " + flags);
432 433
                if (flags==512 || flags==776 || flags==768) {
433 434
					newPts = new Point2D[pts.length+1];
434 435
					newBulges = new double[bulges.length+1];
......
447 448
					Point2D[] points = GisModelCurveCalculator.calculateGisModelBulge(newPts, newBulges);
448 449
					((DwgLwPolyline)pol).setVertices(points);
449 450
				} else {
450
					System.out.println("Encontrada polil?nea sin puntos ...");
451
//					System.out.println("Encontrada polil?nea sin puntos ...");
451 452
					// TODO: No se debe mandar nunca una polil?nea sin puntos, si esto
452 453
					// ocurre es porque existe un error que hay que corregir ...
453 454
				}
......
469 470
				int flags = ((DwgPolyline2D)pol).getFlags();
470 471
				int firstHandle = ((DwgPolyline2D)pol).getFirstVertexHandle();
471 472
				int lastHandle = ((DwgPolyline2D)pol).getLastVertexHandle();
472
				Vector pts = new Vector();
473
				Vector bulges = new Vector();
473
				ArrayList pts = new ArrayList();
474
				ArrayList bulges = new ArrayList();
474 475
				double[] pt = new double[3];
475 476
				for (int j=0;j<dwgObjects.size();j++) {
476 477
					DwgObject firstVertex = (DwgObject)dwgObjects.get(j);
......
523 524
					}
524 525
					((DwgPolyline2D)pol).setPts(points);
525 526
				} else {
526
					System.out.println("Encontrada polil?nea sin puntos ...");
527
//					System.out.println("Encontrada polil?nea sin puntos ...");
527 528
					// TODO: No se debe mandar nunca una polil?nea sin puntos, si esto
528 529
					// ocurre es porque existe un error que hay que corregir ...
529 530
				}
......
538 539
     * add these objects to the DWG object list.
539 540
     */
540 541
	public void blockManagement() {
541
		Vector dwgObjectsWithoutBlocks = new Vector();
542
		ArrayList dwgObjectsWithoutBlocks = new ArrayList();
542 543
    	boolean addingToBlock = false;
543 544
		for (int i=0;i<dwgObjects.size();i++) {
544 545
			DwgObject entity = (DwgObject)dwgObjects.get(i);
......
599 600
     * @param dwgObjectsWithoutBlocks, a object list with the elements extracted from
600 601
     * the blocks.
601 602
     */
602
	private void manageInsert(Point2D insPoint, double[] scale, double rot, int bHandle, int id, Vector dwgObjectsWithoutBlocks) {
603
	private void manageInsert(Point2D insPoint, double[] scale, double rot, int bHandle, int id, ArrayList dwgObjectsWithoutBlocks) {
603 604
	    for (int i=0;i<dwgObjects.size();i++) {
604 605
			DwgObject obj = (DwgObject)dwgObjects.get(i);
605 606
			if (obj instanceof DwgBlockHeader) {
......
636 637
                                        //System.out.println("Encontrado elemento " + k + " del bloque");
637 638
										DwgObject iObj = (DwgObject)dwgObjects.get(j+k);
638 639
										int iObjHandle = iObj.getHandle();
639
										System.out.println("iObj.getType() = " + iObj.getType());
640
                                        System.out.println("insPoint.getX() = " + insPoint.getX());
641
                                        System.out.println("insPoint.getY() = " + insPoint.getY());
642
                                        System.out.println("rot = " + rot);
640
//										System.out.println("iObj.getType() = " + iObj.getType());
641
//                                        System.out.println("insPoint.getX() = " + insPoint.getX());
642
//                                        System.out.println("insPoint.getY() = " + insPoint.getY());
643
//                                        System.out.println("rot = " + rot);
643 644
                                        manageBlockEntity(iObj, bPoint, insPoint, scale, rot, id, dwgObjectsWithoutBlocks);
644 645
										k++;
645 646
										if (iObjHandle==lastObjectHandle) break;
......
667 668
     * @param dwgObjectsWithoutBlocks, a object list with the elements extracted from
668 669
     * the blocks.
669 670
     */
670
	private void manageBlockEntity(DwgObject entity, double[] bPoint, Point2D insPoint, double[] scale, double rot, int id, Vector dwgObjectsWithoutBlocks) {
671
	private void manageBlockEntity(DwgObject entity, double[] bPoint, Point2D insPoint, double[] scale, double rot, int id, ArrayList dwgObjectsWithoutBlocks) {
671 672
		if (entity instanceof DwgArc) {
672 673
			//System.out.println("Encuentra un arco dentro de un bloque ...");
673 674
			DwgArc transformedEntity = new DwgArc();
......
678 679
			double laZ = center[2] * scale[2];
679 680
			double[] transformedCenter = new double[]{laX, laY, laZ};
680 681
			double radius = ((DwgArc)entity).getRadius();
681
            System.out.println("radius = " + radius);
682
            System.out.println("scale[0] = " + scale[0]);
683
            System.out.println("scale[1] = " + scale[1]);
684
            System.out.println("rot = " + rot);
682
//            System.out.println("radius = " + radius);
683
//            System.out.println("scale[0] = " + scale[0]);
684
//            System.out.println("scale[1] = " + scale[1]);
685
//            System.out.println("rot = " + rot);
685 686
			double transformedRadius = radius * scale[0];
686 687
			double initAngle = ((DwgArc)entity).getInitAngle();
687 688
			double endAngle = ((DwgArc)entity).getEndAngle();
688
            System.out.println("initAngle = " + initAngle);
689
            System.out.println("endAngle = " + endAngle);
690
            System.out.println("rot = " + rot);
689
//            System.out.println("initAngle = " + initAngle);
690
//            System.out.println("endAngle = " + endAngle);
691
//            System.out.println("rot = " + rot);
691 692
            double transformedInitAngle = initAngle + rot;
692 693
            if (transformedInitAngle<0) {
693 694
                transformedInitAngle = transformedInitAngle + (2*Math.PI);
......
889 890
	 * parameters. These parameters are handle, name and color
890 891
	 */
891 892
	public void initializeLayerTable() {
892
		layerTable = new Vector();
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff