From a1906e8bbfa426ed1adfe751608bc74f1d4d2ab7 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Wed, 19 Dec 2012 17:03:15 +0000 Subject: Import GNU Classpath (20121202). 2012-12-19 Matthias Klose Import GNU Classpath (20121202). * Regenerate class and header files. * Regenerate auto* files. * sources.am, gcj/javaprims.h: Regenerate. * gnu/java/nio/FileLockImpl.java (close): New override. From-SVN: r194618 --- libjava/classpath/java/lang/System.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libjava/classpath/java/lang/System.java') 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 @@ -712,6 +714,16 @@ public final class System return Console.console(); } + /** + * Returns the system-dependent line separator. + * + * @return the system-dependent line separator. + */ + public static String lineSeparator() + { + return LINE_SEPARATOR; + } + /** * This is a specialised Collection, providing * the necessary provisions for the collections used by the -- cgit v1.2.3