本文整理了Java中net.sf.okapi.common.Util.getExtension()
方法的一些代码示例,展示了Util.getExtension()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getExtension()
方法的具体详情如下:
包路径:net.sf.okapi.common.Util
类名称:Util
方法名:getExtension
[英]Gets the extension of a given path or filename.
[中]获取给定路径或文件名的扩展名。
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-terminology
public void guessAndImport (File file) {
String ext = Util.getExtension(file.getPath());
if ( ext.equalsIgnoreCase(".tbx") ) {
importTBX(file);
}
if ( ext.equalsIgnoreCase(".csv") ) {
importCSV(file);
}
else { // Try tab-delimited
importTSV(file);
}
}
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-segmentation-ui
private String makeNonHtmlOutputPath (String inputPath) {
if ( inputPath.length() == 0 ) return ""; //$NON-NLS-1$
String ext = Util.getExtension(inputPath);
String filename = Util.getFilename(inputPath, false);
return Util.getDirectoryName(inputPath) + File.separator +
filename + Res.getString("testFileDlg.outputExtension") + ext; //$NON-NLS-1$
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-ttxsplitter
+ params.getSuffix() + Util.getExtension(path);
代码示例来源:origin: net.sf.okapi.filters/okapi-filter-its
isHTML5 = Util.getExtension(args[i]).toLowerCase().startsWith(".htm");
代码示例来源:origin: net.sf.okapi.filters/okapi-filter-mosestext
String ext = Util.getExtension(srcOutputPath);
if ( ext.equals("."+srcLCode) ) {
代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit
private String makeTargetPath (MergingInfo item) {
String ex = Util.getExtension(item.getRelativeInputPath());
String sd = Util.getDirectoryName(item.getRelativeInputPath());
String fn = Util.getFilename(item.getRelativeInputPath(), false);
return manifest.getTempSourceDirectory()
+ ( sd.isEmpty() ? "" : sd + "/" )
+ fn + "_" + manifest.getTargetLocale().toPOSIXLocaleId()
+ ex + ".po";
}
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-verification-ui
String ext = Util.getExtension(path);
if ( ext.equalsIgnoreCase(QualityCheckSession.FILE_EXTENSION) ) {
loadSession(path);
代码示例来源:origin: net.sf.okapi.connectors/okapi-connector-bifile
Util.getExtension(file.getName()));
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-verification-ui
outEncoding = rawDoc.getEncoding();
outPath = new File(rawDoc.getInputURI()).getPath();
outPath = Util.getDirectoryName(outPath) + File.separator + Util.getFilename(outPath, false) + ".out" + Util.getExtension(outPath);
writer = sd.getFilterWriter();
writer.setOptions(trgLoc, outEncoding);
内容来源于网络,如有侵权,请联系作者删除!