summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/lang/System.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/lang/System.java')
-rw-r--r--libjava/classpath/java/lang/System.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/libjava/classpath/java/lang/System.java b/libjava/classpath/java/lang/System.java
index ca390bf161b..68d76fc2164 100644
--- a/libjava/classpath/java/lang/System.java
+++ b/libjava/classpath/java/lang/System.java
@@ -1,5 +1,5 @@
/* System.java -- useful methods to interface with the system
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,8 +42,11 @@ package java.lang;
import gnu.classpath.SystemProperties;
import gnu.classpath.VMStackWalker;
+import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
+import java.nio.channels.Channel;
+import java.nio.channels.spi.SelectorProvider;
import java.util.AbstractCollection;
import java.util.Collection;
import java.util.Collections;
@@ -362,6 +365,7 @@ public final class System
* <dt>gnu.java.io.encoding_scheme_alias.iso-latin-_?</dt> <dd>8859_?</dd>
* <dt>gnu.java.io.encoding_scheme_alias.latin?</dt> <dd>8859_?</dd>
* <dt>gnu.java.io.encoding_scheme_alias.utf-8</dt> <dd>UTF8</dd>
+ * <dt>gnu.java.util.zoneinfo.dir</dt> <dd>Root of zoneinfo tree</dd>
* <dt>gnu.javax.print.server</dt> <dd>Hostname of external CUPS server.</dd>
* </dl>
*
@@ -671,6 +675,25 @@ public final class System
return VMRuntime.mapLibraryName(libname);
}
+ /**
+ * Returns the inherited channel of the VM.
+ *
+ * This wraps the inheritedChannel() call of the system's default
+ * {@link SelectorProvider}.
+ *
+ * @return the inherited channel of the VM
+ *
+ * @throws IOException If an I/O error occurs
+ * @throws SecurityException If an installed security manager denies access
+ * to RuntimePermission("inheritedChannel")
+ *
+ * @since 1.5
+ */
+ public static Channel inheritedChannel()
+ throws IOException
+ {
+ return SelectorProvider.provider().inheritedChannel();
+ }
/**
* This is a specialised <code>Collection</code>, providing