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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
|
/* */ package NET.worlds.core;
/* */
/* */ import java.io.File;
/* */ import java.io.InputStream;
/* */ import java.io.PrintStream;
/* */ import java.net.InetAddress;
/* */ import java.net.Socket;
/* */ import java.util.Date;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Std
/* */ {
/* */ public static final String JavaVersion = "1922a10";
/* */ public static final String JavaBuildDate = "2020031200";
/* */ private static String productName;
/* */ private static int lastTime;
/* */
/* */ public static void assertFail(String file, int line)
/* */ {
/* 58 */ String msg = "Assertion failed: file " + file + ", line " + line;
/* 59 */ dumpStackTrace();
/* 60 */ exit();
/* */ }
/* */
/* */ public static String replaceStr(String in, String seek, String replace) {
/* 64 */ if ((seek == null) || (replace == null)) {
/* 65 */ return in;
/* */ }
/* */ int idx;
/* 68 */ while ((idx = in.indexOf(seek)) != -1) { int idx;
/* 69 */ String tmp = in.substring(0, idx) + replace +
/* 70 */ in.substring(idx + seek.length());
/* 71 */ in = tmp;
/* */ }
/* */
/* 74 */ return in;
/* */ }
/* */
/* */ public static native void exit();
/* */
/* */ public static void dumpStackTrace()
/* */ {
/* */ try {
/* 82 */ throw new Error("");
/* */ } catch (Error e) {
/* 84 */ e.printStackTrace(System.out);
/* */ }
/* */ }
/* */
/* */
/* */ public static String getProductName()
/* */ {
/* 91 */ assert (productName != null);
/* */
/* 93 */ return productName;
/* */ }
/* */
/* */ public static void initProductName() {
/* 97 */ assert (productName == null);
/* 98 */ productName = IniFile.gamma().getIniString("PRODUCT_NAME",
/* 99 */ "Worlds.com - The 3D Entertainment Portal");
/* */
/* */
/* 102 */ productName = IniFile.override().getIniString("productName",
/* 103 */ productName);
/* */ }
/* */
/* */ private static native int nativeGetMillis();
/* */
/* */ private static synchronized int getMillis() {
/* 109 */ return nativeGetMillis();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static native int getTimeZero();
/* */
/* */
/* */
/* */
/* */
/* */ public static native long getPerformanceFrequency();
/* */
/* */
/* */
/* */
/* */
/* */ public static native long getPerformanceCount();
/* */
/* */
/* */
/* */
/* */ public static boolean sleep(float seconds)
/* */ {
/* */ try
/* */ {
/* 137 */ Thread.sleep((seconds * 1000.0F));
/* */ } catch (InterruptedException e) {
/* 139 */ return true;
/* */ }
/* */
/* 142 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static int getFastTime()
/* */ {
/* 157 */ if (lastTime == 0)
/* 158 */ getRealTime();
/* 159 */ return lastTime;
/* */ }
/* */
/* */
/* */
/* */ public static int getRealTime()
/* */ {
/* 166 */ lastTime = getMillis();
/* 167 */ return lastTime;
/* */ }
/* */
/* */
/* */
/* */
/* */ public static int getSynchronizedTime()
/* */ {
/* 175 */ initSyncTime();
/* 176 */ return getFastTime() / 1000 + syncTimeBase;
/* */ }
/* */
/* 179 */ static boolean syncTimeInited = false;
/* */
/* */ static int syncTimeBase;
/* 182 */ static boolean offline = IniFile.override().getIniInt("Offline", 0) == 1;
/* 183 */ static boolean stopOnFault = IniFile.gamma().getIniInt("StopOnHttpFault", 0) == 1;
/* 184 */ static String timeServer = IniFile.override().getIniString("timeServer", "time.worlds.net");
/* */
/* */ static void initSyncTime()
/* */ {
/* 188 */ if ((offline) || (stopOnFault)) {
/* 189 */ syncTimeInited = true;
/* 190 */ syncTimeBase = 0;
/* 191 */ return;
/* */ }
/* */
/* 194 */ if (!syncTimeInited) {
/* 195 */ syncTimeInited = true;
/* */ try {
/* 197 */ InetAddress ip = InetAddress.getByName(timeServer);
/* 198 */ Socket s = new Socket(ip, 37);
/* */
/* 200 */ InputStream is = s.getInputStream();
/* 201 */ int b1 = is.read();
/* 202 */ int b2 = is.read();
/* 203 */ int b3 = is.read();
/* 204 */ int b4 = is.read();
/* 205 */ is.close();
/* 206 */ long time = (b1 << 24) + (b2 << 16) + (b3 << 8) + b4;
/* */
/* */
/* 209 */ time -= -1141367296L;
/* 210 */ syncTimeBase = (int)time - getFastTime() / 1000;
/* 211 */ s.close();
/* */ } catch (Exception e) {
/* 213 */ System.out.println("Error retrieving network time: " + e);
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static native boolean instanceOf(Object paramObject, Class<?> paramClass);
/* */
/* */
/* */
/* */
/* */
/* */ public static native String getenv(String paramString);
/* */
/* */
/* */
/* */
/* */
/* */ public static long GetDiskFreeSpace(String drive)
/* */ {
/* 236 */ long value = -1L;
/* */ try
/* */ {
/* 239 */ if (drive == null) {
/* 240 */ drive = ".";
/* */ }
/* 242 */ File f = new File(drive);
/* 243 */ value = f.getFreeSpace() / 1024L;
/* */ }
/* */ catch (Exception ex) {
/* 246 */ value = -1L;
/* */ }
/* */
/* 249 */ return value;
/* */ }
/* */
/* */
/* */
/* */ public static long GetDiskFreeSpace()
/* */ {
/* 256 */ return GetDiskFreeSpace(null);
/* */ }
/* */
/* */
/* */
/* */
/* */ public static void printThreads()
/* */ {
/* 264 */ ThreadGroup tg = Thread.currentThread().getThreadGroup();
/* 265 */ Thread[] ta = new Thread[100];
/* 266 */ int n = tg.enumerate(ta);
/* 267 */ tg.list();
/* 268 */ for (int i = 0; i < n; i++) {
/* 269 */ if (ta[i].isDaemon()) {
/* 270 */ System.out.println("is daemon");
/* */ } else {
/* 272 */ System.out.println("isn't daemon");
/* */ }
/* */ }
/* */ }
/* */
/* */ public static void printlnOut(String msg)
/* */ {
/* 279 */ System.out.println(msg);
/* */ }
/* */
/* */
/* */
/* */
/* */ public static native boolean byteArraysEqual(byte[] paramArrayOfByte1, byte[] paramArrayOfByte2);
/* */
/* */
/* */
/* */
/* */ public static native String getBuildInfo();
/* */
/* */
/* */
/* */
/* */ public static native int getVersion();
/* */
/* */
/* */
/* */ public static String getJavaVersion()
/* */ {
/* 301 */ return "1922a10";
/* */ }
/* */
/* */ public static String getJavaBuildDate() {
/* 305 */ return "2020031200";
/* */ }
/* */
/* */
/* */ public static native String getClientVersion();
/* */
/* */
/* */ private static native int getBuildYear();
/* */
/* */
/* */ private static native int getBuildMonth();
/* */
/* */ private static native int getBuildDay();
/* */
/* */ public static long getBuildDate()
/* */ {
/* 321 */ return
/* 322 */ Date.UTC(getBuildYear(), getBuildMonth(), getBuildDay(), 0, 0, 0);
/* */ }
/* */
/* */ public static native int checkNativeHeap();
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\core\Std.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|