本文整理汇总了C#中biz.ritter.javapi.getProperty方法的典型用法代码示例。如果您正苦于以下问题:C# biz.ritter.javapi.getProperty方法的具体用法?C# biz.ritter.javapi.getProperty怎么用?C# biz.ritter.javapi.getProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biz.ritter.javapi
的用法示例。
在下文中一共展示了biz.ritter.javapi.getProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: flushFilePrefsImpl
static void flushFilePrefsImpl(java.io.File file, java.util.Properties prefs)
{
//throws IOException {
java.io.BufferedWriter outJ = null;
java.nio.channels.FileLock lockJ = null;
try {
java.io.FileOutputStream ostream = new java.io.FileOutputStream (file);
outJ = new java.io.BufferedWriter (new java.io.OutputStreamWriter (ostream, "UTF-8")); //$NON-NLS-1$
java.nio.channels.FileChannel channel = ostream.getChannel ();
lockJ = channel.lockJ ();
outJ.write (HEADER);
outJ.newLine ();
outJ.write (FILE_PREFS);
outJ.newLine ();
if (prefs.size () == 0) {
exportEntries (EMPTY_SARRAY, EMPTY_SARRAY, outJ);
} else {
String[] keys = prefs.keySet ()
.toArray (new String[prefs.size ()]);
int length = keys.Length;
String[] values = new String[length];
for (int i = 0; i < length; i++) {
values [i] = prefs.getProperty (keys [i]);
}
exportEntries (keys, values, outJ);
}
outJ.flush ();
} finally {
releaseQuietly (lockJ);
closeQuietly (outJ);
}
}