Example usage for org.apache.commons.lang SystemUtils FILE_ENCODING

List of usage examples for org.apache.commons.lang SystemUtils FILE_ENCODING

Introduction

In this page you can find the example usage for org.apache.commons.lang SystemUtils FILE_ENCODING.

Prototype

String FILE_ENCODING

To view the source code for org.apache.commons.lang SystemUtils FILE_ENCODING.

Click Source Link

Document

The file.encoding System Property.

File encoding, such as Cp1252.

Defaults to null if the runtime does not have security access to read this property or the property does not exist.

This value is initialized when the class is loaded.

Usage

From source file:org.qedeq.base.io.IoUtility.java

/**
 * Get default encoding for this system.
 *
 * @return  Default encoding for this system.
 */// ww w . j  av  a  2s.co m
public static String getDefaultEncoding() {
    return SystemUtils.FILE_ENCODING;
    // mime 20090630: under ubuntu the following gave the encoding ASCII:
    //        return new InputStreamReader(
    //              new ByteArrayInputStream(new byte[0])).getEncoding();
    // but it was: file.encoding="ANSI_X3.41968"
}