38 |
|
|
39 |
package java.lang; |
package java.lang; |
40 |
|
|
41 |
import java.io.*; |
import java.io.FileInputStream; |
42 |
import java.util.*; |
import java.io.FileDescriptor; |
43 |
|
import java.io.FileOutputStream; |
44 |
|
import java.io.InputStream; |
45 |
|
import java.io.PrintStream; |
46 |
|
import java.util.Properties; |
47 |
|
import java.util.PropertyPermission; |
48 |
import gnu.classpath.Configuration; |
import gnu.classpath.Configuration; |
49 |
|
|
50 |
/** |
/** |
77 |
} |
} |
78 |
|
|
79 |
/** |
/** |
80 |
* Stores the system properties. |
* The default properties. Read them in once, then stuff them as defaults |
81 |
|
* into future properties to save time when recreating properties via |
82 |
|
* <code>setProperties(null)</code>. This should not be modified. |
83 |
*/ |
*/ |
84 |
private static Properties properties; |
private static final Properties defaultProperties = new Properties(); |
85 |
|
static |
86 |
|
{ |
87 |
|
VMSystem.insertSystemProperties(defaultProperties); |
88 |
|
defaultProperties.put("gnu.cpu.endian", |
89 |
|
isWordsBigEndian() ? "big" : "little"); |
90 |
|
|
91 |
|
// Common encoding aliases. See gnu.java.io.EncodingManager. |
92 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-1", |
93 |
|
"8859_1"); |
94 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-2", |
95 |
|
"8859_2"); |
96 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-3", |
97 |
|
"8859_3"); |
98 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-4", |
99 |
|
"8859_4"); |
100 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-5", |
101 |
|
"8859_5"); |
102 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-6", |
103 |
|
"8859_6"); |
104 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-7", |
105 |
|
"8859_7"); |
106 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-8", |
107 |
|
"8859_8"); |
108 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-9", |
109 |
|
"8859_9"); |
110 |
|
|
111 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-1", |
112 |
|
"8859_1"); |
113 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-2", |
114 |
|
"8859_2"); |
115 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-3", |
116 |
|
"8859_3"); |
117 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-4", |
118 |
|
"8859_4"); |
119 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-5", |
120 |
|
"8859_5"); |
121 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-6", |
122 |
|
"8859_6"); |
123 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-7", |
124 |
|
"8859_7"); |
125 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-8", |
126 |
|
"8859_8"); |
127 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-8859-9", |
128 |
|
"8859_9"); |
129 |
|
|
130 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_1", |
131 |
|
"8859_1"); |
132 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_2", |
133 |
|
"8859_2"); |
134 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_3", |
135 |
|
"8859_3"); |
136 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_4", |
137 |
|
"8859_4"); |
138 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_5", |
139 |
|
"8859_5"); |
140 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_6", |
141 |
|
"8859_6"); |
142 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_7", |
143 |
|
"8859_7"); |
144 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_8", |
145 |
|
"8859_8"); |
146 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso8859_9", |
147 |
|
"8859_9"); |
148 |
|
|
149 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-1", |
150 |
|
"8859_1"); |
151 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-2", |
152 |
|
"8859_2"); |
153 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-3", |
154 |
|
"8859_3"); |
155 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-4", |
156 |
|
"8859_4"); |
157 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-5", |
158 |
|
"8859_5"); |
159 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-6", |
160 |
|
"8859_6"); |
161 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-7", |
162 |
|
"8859_7"); |
163 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-8", |
164 |
|
"8859_8"); |
165 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.iso-latin-9", |
166 |
|
"8859_9"); |
167 |
|
|
168 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin1", |
169 |
|
"8859_1"); |
170 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin2", |
171 |
|
"8859_2"); |
172 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin3", |
173 |
|
"8859_3"); |
174 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin4", |
175 |
|
"8859_4"); |
176 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin5", |
177 |
|
"8859_5"); |
178 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin6", |
179 |
|
"8859_6"); |
180 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin7", |
181 |
|
"8859_7"); |
182 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin8", |
183 |
|
"8859_8"); |
184 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.latin9", |
185 |
|
"8859_9"); |
186 |
|
|
187 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.UTF-8", "UTF8"); |
188 |
|
defaultProperties.put("gnu.java.io.encoding_scheme_alias.utf-8", "UTF8"); |
189 |
|
|
190 |
|
// XXX FIXME - Temp hack for old systems that set the wrong property |
191 |
|
if (defaultProperties.get("java.io.tmpdir") == null) |
192 |
|
defaultProperties.put("java.io.tmpdir", |
193 |
|
defaultProperties.get("java.tmpdir")); |
194 |
|
} |
195 |
|
|
196 |
|
/** |
197 |
|
* Stores the current system properties. This can be modified by |
198 |
|
* {@link #setProperties(Properties)}, but will never be null, because |
199 |
|
* setProperties(null) sucks in the default properties. |
200 |
|
*/ |
201 |
|
private static Properties properties = new Properties(defaultProperties); |
202 |
|
|
203 |
/** |
/** |
204 |
* The standard InputStream. This is assigned at startup and starts its |
* The standard InputStream. This is assigned at startup and starts its |
210 |
* other processes or files. That should all be transparent to you, |
* other processes or files. That should all be transparent to you, |
211 |
* however. |
* however. |
212 |
*/ |
*/ |
213 |
public static final InputStream in; |
public static final InputStream in |
214 |
|
= new FileInputStream(FileDescriptor.in); |
215 |
/** |
/** |
216 |
* The standard output PrintStream. This is assigned at startup and |
* The standard output PrintStream. This is assigned at startup and |
217 |
* starts its life perfectly valid. Although it is marked final, you can |
* starts its life perfectly valid. Although it is marked final, you can |
222 |
* output to other processes or files. That should all be transparent to |
* output to other processes or files. That should all be transparent to |
223 |
* you, however. |
* you, however. |
224 |
*/ |
*/ |
225 |
public static final PrintStream out; |
public static final PrintStream out |
226 |
|
= new PrintStream(new FileOutputStream(FileDescriptor.out)); |
227 |
/** |
/** |
228 |
* The standard output PrintStream. This is assigned at startup and |
* The standard output PrintStream. This is assigned at startup and |
229 |
* starts its life perfectly valid. Although it is marked final, you can |
* starts its life perfectly valid. Although it is marked final, you can |
234 |
* output to other processes or files. That should all be transparent to |
* output to other processes or files. That should all be transparent to |
235 |
* you, however. |
* you, however. |
236 |
*/ |
*/ |
237 |
public static final PrintStream err; |
public static final PrintStream err |
238 |
|
= new PrintStream(new FileOutputStream(FileDescriptor.err)); |
|
/** |
|
|
* Initialize the properties and I/O streams. |
|
|
*/ |
|
|
static |
|
|
{ |
|
|
properties = new Properties(); |
|
|
VMSystem.insertSystemProperties(properties); |
|
|
|
|
|
// XXX FIXME - Temp hack for old systems that set the wrong property |
|
|
if (properties.get("java.io.tmpdir") == null) |
|
|
properties.put("java.io.tmpdir", properties.get("java.tmpdir")); |
|
|
|
|
|
insertGNUProperties(); |
|
|
in = new FileInputStream(FileDescriptor.in); |
|
|
out = new PrintStream(new FileOutputStream(FileDescriptor.out)); |
|
|
err = new PrintStream(new FileOutputStream(FileDescriptor.err)); |
|
|
} |
|
239 |
|
|
240 |
/** |
/** |
241 |
* Set {@link #in} to a new InputStream. This uses some VM magic to change |
* Set {@link #in} to a new InputStream. This uses some VM magic to change |
245 |
* @param in the new InputStream |
* @param in the new InputStream |
246 |
* @throws SecurityException if permission is denied |
* @throws SecurityException if permission is denied |
247 |
* @since 1.1 |
* @since 1.1 |
|
* @XXX Perform security check (which means setIn should probably be in |
|
|
* Java, and add setIn0 as native). |
|
248 |
*/ |
*/ |
249 |
public static native void setIn(InputStream in); |
public static void setIn(InputStream in) |
250 |
|
{ |
251 |
|
SecurityManager sm = Runtime.getSecurityManager(); |
252 |
|
if (sm != null) |
253 |
|
sm.checkPermission(new RuntimePermission("setIO")); |
254 |
|
setIn0(in); |
255 |
|
} |
256 |
|
|
257 |
/** |
/** |
258 |
* Set {@link #out} to a new PrintStream. This uses some VM magic to change |
* Set {@link #out} to a new PrintStream. This uses some VM magic to change |
262 |
* @param out the new PrintStream |
* @param out the new PrintStream |
263 |
* @throws SecurityException if permission is denied |
* @throws SecurityException if permission is denied |
264 |
* @since 1.1 |
* @since 1.1 |
|
* @XXX Perform security check (which means setOut should probably be in |
|
|
* Java, and add setOut0 as native). |
|
265 |
*/ |
*/ |
266 |
public static native void setOut(PrintStream out); |
public static void setOut(PrintStream out) |
267 |
|
{ |
268 |
|
SecurityManager sm = Runtime.getSecurityManager(); |
269 |
|
if (sm != null) |
270 |
|
sm.checkPermission(new RuntimePermission("setIO")); |
271 |
|
setOut0(out); |
272 |
|
} |
273 |
|
|
274 |
/** |
/** |
275 |
* Set {@link #err} to a new PrintStream. This uses some VM magic to change |
* Set {@link #err} to a new PrintStream. This uses some VM magic to change |
279 |
* @param err the new PrintStream |
* @param err the new PrintStream |
280 |
* @throws SecurityException if permission is denied |
* @throws SecurityException if permission is denied |
281 |
* @since 1.1 |
* @since 1.1 |
|
* @XXX Perform security check (which means setErr should probably be in |
|
|
* Java, and add setErr0 as native). |
|
282 |
*/ |
*/ |
283 |
public static native void setErr(PrintStream err); |
public static void setErr(PrintStream err) |
284 |
|
{ |
285 |
|
SecurityManager sm = Runtime.getSecurityManager(); |
286 |
|
if (sm != null) |
287 |
|
sm.checkPermission(new RuntimePermission("setIO")); |
288 |
|
setErr0(err); |
289 |
|
} |
290 |
|
|
291 |
/** |
/** |
292 |
* Set the current SecurityManager. If a security manager already exists, |
* Set the current SecurityManager. If a security manager already exists, |
382 |
* <code>checkPropertiesAccess</code>. Note that a security manager may |
* <code>checkPropertiesAccess</code>. Note that a security manager may |
383 |
* allow getting a single property, but not the entire group. |
* allow getting a single property, but not the entire group. |
384 |
* |
* |
385 |
* <p>The default properties include: |
* <p>The required properties include: |
386 |
* <dl> |
* <dl> |
387 |
* <dt>java.version <dd>Java version number |
* <dt>java.version <dd>Java version number |
388 |
* <dt>java.vendor <dd>Java vendor specific string |
* <dt>java.vendor <dd>Java vendor specific string |
414 |
* <dt>user.dir <dd>User's current working directory |
* <dt>user.dir <dd>User's current working directory |
415 |
* </dl> |
* </dl> |
416 |
* |
* |
417 |
|
* In addition, gnu defines several other properties, where ? stands for |
418 |
|
* each character in '0' through '9': |
419 |
|
* <dl> |
420 |
|
* <dt> gnu.cpu.endian <dd>big or little |
421 |
|
* <dt> gnu.java.io.encoding_scheme_alias.ISO-8859-? <dd>8859_? |
422 |
|
* <dt> gnu.java.io.encoding_scheme_alias.iso-8859-? <dd>8859_? |
423 |
|
* <dt> gnu.java.io.encoding_scheme_alias.iso8859_? <dd>8859_? |
424 |
|
* <dt> gnu.java.io.encoding_scheme_alias.iso-latin-_? <dd>8859_? |
425 |
|
* <dt> gnu.java.io.encoding_scheme_alias.latin? <dd>8859_? |
426 |
|
* <dt> gnu.java.io.encoding_scheme_alias.UTF-8 <dd>UTF8 |
427 |
|
* <dt> gnu.java.io.encoding_scheme_alias.utf-8 <dd>UTF8 |
428 |
|
* </dl> |
429 |
|
* |
430 |
* @return the system properties, will never be null |
* @return the system properties, will never be null |
431 |
* @throws SecurityException if permission is denied |
* @throws SecurityException if permission is denied |
432 |
*/ |
*/ |
435 |
SecurityManager sm = Runtime.getSecurityManager(); |
SecurityManager sm = Runtime.getSecurityManager(); |
436 |
if (sm != null) |
if (sm != null) |
437 |
sm.checkPropertiesAccess(); |
sm.checkPropertiesAccess(); |
|
//XXX Make sure this is not null, and be thread-safe |
|
438 |
return properties; |
return properties; |
439 |
} |
} |
440 |
|
|
452 |
SecurityManager sm = Runtime.getSecurityManager(); |
SecurityManager sm = Runtime.getSecurityManager(); |
453 |
if (sm != null) |
if (sm != null) |
454 |
sm.checkPropertiesAccess(); |
sm.checkPropertiesAccess(); |
455 |
// XXX Special case null |
if (properties == null) |
456 |
|
properties = new Properties(defaultProperties); |
457 |
System.properties = properties; |
System.properties = properties; |
458 |
} |
} |
459 |
|
|
472 |
SecurityManager sm = Runtime.getSecurityManager(); |
SecurityManager sm = Runtime.getSecurityManager(); |
473 |
if (sm != null) |
if (sm != null) |
474 |
sm.checkPropertyAccess(key); |
sm.checkPropertyAccess(key); |
|
// XXX ensure properties is not null, and be thread-safe |
|
475 |
return properties.getProperty(key); |
return properties.getProperty(key); |
476 |
} |
} |
477 |
|
|
491 |
SecurityManager sm = Runtime.getSecurityManager(); |
SecurityManager sm = Runtime.getSecurityManager(); |
492 |
if (sm != null) |
if (sm != null) |
493 |
sm.checkPropertyAccess(key); |
sm.checkPropertyAccess(key); |
|
// XXX ensure properties is not null, and be thread-safe |
|
494 |
return properties.getProperty(key, def); |
return properties.getProperty(key, def); |
495 |
} |
} |
496 |
|
|
511 |
SecurityManager sm = Runtime.getSecurityManager(); |
SecurityManager sm = Runtime.getSecurityManager(); |
512 |
if (sm != null) |
if (sm != null) |
513 |
sm.checkPermission(new PropertyPermission(key, "write")); |
sm.checkPermission(new PropertyPermission(key, "write")); |
|
// XXX ensure properties is not null, and be thread-safe |
|
514 |
return (String) properties.setProperty(key, value); |
return (String) properties.setProperty(key, value); |
515 |
} |
} |
516 |
|
|
517 |
/** |
/** |
518 |
* Get an environment variable. <b>WARNING</b>: This is not the preferred |
* This used to get an environment variable, but following Sun's lead, |
519 |
* way to check properties, nor is it guaranteed to work across all |
* it now throws an Error. Use <code>getProperty</code> instead. |
|
* implementations. Use <code>getProperty</code> instead. |
|
520 |
* |
* |
521 |
* @param name the name of the environment variable |
* @param name the name of the environment variable |
522 |
* @return the value of the variable, or null |
* @return this does not return |
523 |
* @deprecated use {@link #getProperty(String)} |
* @throws Error this is not supported |
524 |
|
* @deprecated use {@link #getProperty(String)}; getenv is not supported |
525 |
*/ |
*/ |
526 |
public static String getenv(String name) |
public static String getenv(String name) |
527 |
{ |
{ |
528 |
//XXX This should be a native method, which actually uses getenv(3). |
throw new Error("getenv no longer supported, use properties instead: " |
529 |
return getProperty(name); |
+ name); |
530 |
} |
} |
531 |
|
|
532 |
/** |
/** |
627 |
* @param libname the library name, as used in <code>loadLibrary</code> |
* @param libname the library name, as used in <code>loadLibrary</code> |
628 |
* @return the platform-specific mangling of the name |
* @return the platform-specific mangling of the name |
629 |
* @since 1.2 |
* @since 1.2 |
630 |
* @XXX Add this method, and its support in VMSystem. |
*/ |
631 |
public static String mapLibraryName(String libname) |
public static String mapLibraryName(String libname) |
632 |
{ |
{ |
633 |
return VMSystem.mapLibraryName(libname); |
// XXX Fix this!!!! |
634 |
|
return Runtime.nativeGetLibname("", libname); |
635 |
} |
} |
|
*/ |
|
636 |
|
|
637 |
/** |
/** |
638 |
* Add Classpath specific system properties. |
* Detect big-endian systems. |
639 |
* <br> |
* |
640 |
* Current properties: |
* @return true if the system is big-endian. |
|
* <br> |
|
|
* <ul> |
|
|
* <li> gnu.cpu.endian - big or little</li> |
|
|
* <li> gnu.java.io.encoding_scheme_alias.ISO-8859-? - 8859_?</li> |
|
|
* <li> gnu.java.io.encoding_scheme_alias.iso-8859-? - 8859_?</li> |
|
|
* <li> gnu.java.io.encoding_scheme_alias.iso8859_? - 8859_?</li> |
|
|
* <li> gnu.java.io.encoding_scheme_alias.iso-latin-_? - 8859_?</li> |
|
|
* <li> gnu.java.io.encoding_scheme_alias.latin? - 8859_?</li> |
|
|
* <li> gnu.java.io.encoding_scheme_alias.UTF-8 - UTF8</li> |
|
|
* <li> gnu.java.io.encoding_scheme_alias.utf-8 - UTF8</li> |
|
|
* </ul> |
|
|
* @see gnu.java.io.EncodingManager |
|
641 |
*/ |
*/ |
642 |
static void insertGNUProperties() |
static native boolean isWordsBigEndian(); |
|
{ |
|
|
properties.put("gnu.cpu.endian", |
|
|
isWordsBigEndian() ? "big" : "little"); |
|
643 |
|
|
644 |
// Common encoding aliases. See gnu.java.io.EncodingManager. |
/** |
645 |
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-1", "8859_1"); |
* Set {@link #in} to a new InputStream. |
646 |
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-2", "8859_2"); |
* |
647 |
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-3", "8859_3"); |
* @param in the new InputStream |
648 |
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-4", "8859_4"); |
* @see #setIn(InputStream) |
649 |
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-5", "8859_5"); |
*/ |
650 |
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-6", "8859_6"); |
private static native void setIn0(InputStream in); |
|
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-7", "8859_7"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-8", "8859_8"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.ISO-8859-9", "8859_9"); |
|
|
|
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-1", "8859_1"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-2", "8859_2"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-3", "8859_3"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-4", "8859_4"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-5", "8859_5"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-6", "8859_6"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-7", "8859_7"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-8", "8859_8"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-8859-9", "8859_9"); |
|
|
|
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_1", "8859_1"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_2", "8859_2"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_3", "8859_3"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_4", "8859_4"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_5", "8859_5"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_6", "8859_6"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_7", "8859_7"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_8", "8859_8"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso8859_9", "8859_9"); |
|
|
|
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-1", "8859_1"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-2", "8859_2"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-3", "8859_3"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-4", "8859_4"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-5", "8859_5"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-6", "8859_6"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-7", "8859_7"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-8", "8859_8"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.iso-latin-9", "8859_9"); |
|
|
|
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin1", "8859_1"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin2", "8859_2"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin3", "8859_3"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin4", "8859_4"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin5", "8859_5"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin6", "8859_6"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin7", "8859_7"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin8", "8859_8"); |
|
|
properties.put("gnu.java.io.encoding_scheme_alias.latin9", "8859_9"); |
|
651 |
|
|
652 |
properties.put("gnu.java.io.encoding_scheme_alias.UTF-8", "UTF8"); |
/** |
653 |
properties.put("gnu.java.io.encoding_scheme_alias.utf-8", "UTF8"); |
* Set {@link #out} to a new PrintStream. |
654 |
} |
* |
655 |
|
* @param out the new PrintStream |
656 |
|
* @see #setOut(PrintStream) |
657 |
|
*/ |
658 |
|
private static native void setOut0(PrintStream out); |
659 |
|
|
660 |
/** |
/** |
661 |
* Detect big-endian systems. |
* Set {@link #err} to a new PrintStream. |
662 |
* |
* |
663 |
* @return true if the system is big-endian. |
* @param err the new PrintStream |
664 |
|
* @see #setErr(PrintStream) |
665 |
*/ |
*/ |
666 |
static native boolean isWordsBigEndian(); |
private static native void setErr0(PrintStream err); |
667 |
} |
} |