diff options
Diffstat (limited to 'libjava/classpath/java/lang/System.java')
-rw-r--r-- | libjava/classpath/java/lang/System.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libjava/classpath/java/lang/System.java b/libjava/classpath/java/lang/System.java index 51b3259fa8b..9d869918300 100644 --- a/libjava/classpath/java/lang/System.java +++ b/libjava/classpath/java/lang/System.java @@ -97,6 +97,8 @@ public final class System */ public static final PrintStream out = VMSystem.makeStandardOutputStream(); + private static final String LINE_SEPARATOR = SystemProperties.getProperty("line.separator"); + /** * The standard output PrintStream. This is assigned at startup and * starts its life perfectly valid. Although it is marked final, you can @@ -713,6 +715,16 @@ public final class System } /** + * Returns the system-dependent line separator. + * + * @return the system-dependent line separator. + */ + public static String lineSeparator() + { + return LINE_SEPARATOR; + } + + /** * This is a specialised <code>Collection</code>, providing * the necessary provisions for the collections used by the * environment variable map. Namely, it prevents |