blob: f1fddb4b7ef0ec1773ae2cb32dc749bcbf8025c8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
/* */ package NET.worlds.network;
/* */
/* */ import java.io.IOException;
/* */ import java.util.Vector;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class OldPropertyList
/* */ {
/* */ private Vector<netProperty> _propList;
/* */
/* */ public OldPropertyList()
/* */ {
/* 25 */ this._propList = new Vector();
/* */ }
/* */
/* */ public void addProperty(netProperty prop) {
/* 29 */ assert (getProperty(prop.property()) == null);
/* 30 */ this._propList.addElement(prop);
/* */ }
/* */
/* */ public int size() {
/* 34 */ return this._propList.size();
/* */ }
/* */
/* */ public final netProperty elementAt(int i) {
/* 38 */ return (netProperty)this._propList.elementAt(i);
/* */ }
/* */
/* */ public netProperty getProperty(int propID) {
/* 42 */ for (int i = this._propList.size() - 1; i >= 0; i--) {
/* 43 */ if (elementAt(i).property() == propID)
/* 44 */ return elementAt(i);
/* */ }
/* 46 */ return null;
/* */ }
/* */
/* */
/* */
/* */ void parseNetData(ServerInputStream data)
/* */ throws IOException
/* */ {
/* 54 */ this._propList = new Vector();
/* 55 */ while (!data.isEmpty()) {
/* 56 */ netProperty tmpProp = new netProperty();
/* 57 */ tmpProp.parseNetData(data);
/* 58 */ this._propList.addElement(tmpProp);
/* */ }
/* */ }
/* */
/* */ int packetSize() {
/* 63 */ int len = 0;
/* */
/* 65 */ for (int i = this._propList.size() - 1; i >= 0; i--) {
/* 66 */ netProperty tmpProp = (netProperty)this._propList.elementAt(i);
/* 67 */ len += tmpProp.packetSize();
/* */ }
/* 69 */ return len;
/* */ }
/* */
/* */ void send(ServerOutputStream o) throws IOException {
/* 73 */ int maxidx = this._propList.size();
/* */
/* 75 */ for (int i = 0; i < maxidx; i++) {
/* 76 */ netProperty tmpProp = (netProperty)this._propList.elementAt(i);
/* 77 */ tmpProp.send(o);
/* */ }
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 83 */ String out = "(";
/* 84 */ int maxidx = this._propList.size();
/* */
/* 86 */ for (int i = 0; i < maxidx; i++) {
/* 87 */ netProperty tmpProp = (netProperty)this._propList.elementAt(i);
/* 88 */ out = out + tmpProp + " ";
/* */ }
/* 90 */ out = out + ")";
/* 91 */ return out;
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\OldPropertyList.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|