本文整理汇总了Java中com.sun.squawk.VM.getFileSeparatorChar方法的典型用法代码示例。如果您正苦于以下问题:Java VM.getFileSeparatorChar方法的具体用法?Java VM.getFileSeparatorChar怎么用?Java VM.getFileSeparatorChar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.squawk.VM
的用法示例。
在下文中一共展示了VM.getFileSeparatorChar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProperty
import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
* Gets the system property indicated by the specified key.
*
* @param key the name of the system property.
* @return the string value of the system property,
* or <code>null</code> if there is no property with that key.
*
* @exception NullPointerException if <code>key</code> is
* <code>null</code>.
* @exception IllegalArgumentException if <code>key</code> is empty.
*/
public static String getProperty(String key) {
if (key == null) {
throw new NullPointerException(/*"key can't be null"*/);
}
if (key.length() == 0) {
throw new IllegalArgumentException(/*"key can't be empty"*/);
}
/*
* These are the hard-coded properties that cannot be changed.
*/
if (key.equals("microedition.configuration")) { return "CLDC-1.1"; }
if (key.equals("microedition.encoding")) { return Helper.defaultEncoding; }
if (key.equals("microedition.locale")) { return "en-US"; }
if (key.equals("microedition.platform")) { return "j2me"; }
// if (key.equals("microedition.profiles")) { return MIDlet.SUPPORTED_PROFILE; }
if (key.equals("microedition.profiles")) { return "IMP-1.0"; }
/*if[!FLASH_MEMORY]*/
if (key.equals("awtcore.classbase")) { return "awtcore.impl.squawk"; }
/*end[FLASH_MEMORY]*/
if (key.equals("javax.microedition.io.Connector.protocolpath")) { return "com.sun.squawk.io"; }
if (key.equals("file.separator")) { return "" + VM.getFileSeparatorChar(); }
if (key.equals("path.separator")) { return "" + VM.getPathSeparatorChar(); }
if (VM.getCurrentIsolate() == null) {
return null;
}
String value = VM.getCurrentIsolate().getProperty(key);
return value;
}
示例2: getFileSeparator
import com.sun.squawk.VM; //导入方法依赖的package包/类
/**
* Gets the system-dependent file separator character.
* @return The file separator character.
*/
public static char getFileSeparator() {
return VM.getFileSeparatorChar();
}