List of usage examples for java.util Locale ROOT
Locale ROOT
To view the source code for java.util Locale ROOT.
Click Source Link
From source file:ch.cyberduck.core.AbstractProtocol.java
@Override public String getName() { return this.getScheme().name().toUpperCase(Locale.ROOT); }
From source file:ch.algotrader.vo.LogEventVO.java
public LogEventVO(final String priority, final String eventMessage, final Class<? extends Throwable> exceptionClass, final String exceptionMessage) { Validate.notEmpty(priority, "Log priority is empty"); this.priority = priority.toLowerCase(Locale.ROOT); this.eventMessage = eventMessage; this.exceptionClass = exceptionClass; this.exceptionMessage = exceptionMessage; }
From source file:de.ks.menu.MenuItemDescriptor.java
public MenuItemDescriptor(String menuPath, int order, String imagePath, Class<?> target) { this.menuPath = menuPath; this.menuItemPath = menuPath + "/" + target.getSimpleName().toLowerCase(Locale.ROOT); this.imagePath = imagePath; this.target = target; this.order = order; }
From source file:io.github.dustalov.maxmax.Application.java
private static void write(String filename, MaxMax<String> maxmax) throws IOException { try (final BufferedWriter writer = Files.newBufferedWriter(Paths.get(filename))) { int i = 0; for (final Set<String> cluster : maxmax.getClusters()) { writer.write(String.format(Locale.ROOT, "%d\t%d\t%s\n", i++, cluster.size(), String.join(", ", cluster))); }//from ww w. j a va 2s. c o m } }
From source file:com.grayfox.server.dao.jdbc.JdbcDao.java
protected String getQuery(String which) { return ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE_NAME, Locale.ROOT, new XmlResourceBundleControl()) .getString(which).trim();/* w ww .ja v a2 s. c o m*/ }
From source file:com.gargoylesoftware.htmlunit.source.SVN.java
/** * Ensures that all files inside the specified directory has consistent new lines. * @param dir the directory to recursively ensure all contained files have consistent new lines * @throws IOException if an exception happens *//*w ww .j a v a 2 s .co m*/ public static void consistentNewlines(final File dir) throws IOException { for (final File f : dir.listFiles()) { if (f.isDirectory()) { if (!".svn".equals(f.getName())) { consistentNewlines(f); } } else { final String fileName = f.getName().toLowerCase(Locale.ROOT); for (final String extension : EOL_EXTENSIONS_) { if (fileName.endsWith(extension)) { FileUtils.writeLines(f, FileUtils.readLines(f)); break; } } } } }
From source file:com.astamuse.asta4d.util.i18n.LocalizeUtil.java
public static final Locale defaultWhenNull(Locale locale) { if (locale == null) { locale = Context.getCurrentThreadContext().getCurrentLocale(); if (locale == null) { locale = Locale.getDefault(); if (locale == null) { locale = Locale.ROOT; }/* w ww. ja v a 2 s . co m*/ } } return locale; }
From source file:fi.ilmoeuro.membertrack.person.Person.java
public String getGravatarUrl() { return String.format("//gravatar.com/avatar/%s?d=mm", DigestUtils.md5Hex(getEmail().toLowerCase(Locale.ROOT).trim())); }
From source file:Main.java
/** * Returns one of the following which represent the type of the given SQL statement. * <ol>//w w w .j av a 2 s. c o m * <li>{@link #STATEMENT_SELECT}</li> * <li>{@link #STATEMENT_UPDATE}</li> * <li>{@link #STATEMENT_ATTACH}</li> * <li>{@link #STATEMENT_BEGIN}</li> * <li>{@link #STATEMENT_COMMIT}</li> * <li>{@link #STATEMENT_ABORT}</li> * <li>{@link #STATEMENT_OTHER}</li> * </ol> * * @param sql the SQL statement whose type is returned by this method * @return one of the values listed above */ public static int getSqlStatementType(String sql) { sql = sql.trim(); if (sql.length() < 3) { return STATEMENT_OTHER; } String prefixSql = sql.substring(0, 3).toUpperCase(Locale.ROOT); if (prefixSql.equals("SEL")) { return STATEMENT_SELECT; } else if (prefixSql.equals("INS") || prefixSql.equals("UPD") || prefixSql.equals("REP") || prefixSql.equals("DEL")) { return STATEMENT_UPDATE; } else if (prefixSql.equals("ATT")) { return STATEMENT_ATTACH; } else if (prefixSql.equals("COM")) { return STATEMENT_COMMIT; } else if (prefixSql.equals("END")) { return STATEMENT_COMMIT; } else if (prefixSql.equals("ROL")) { return STATEMENT_ABORT; } else if (prefixSql.equals("BEG")) { return STATEMENT_BEGIN; } else if (prefixSql.equals("PRA")) { return STATEMENT_PRAGMA; } else if (prefixSql.equals("CRE") || prefixSql.equals("DRO") || prefixSql.equals("ALT")) { return STATEMENT_DDL; } else if (prefixSql.equals("ANA") || prefixSql.equals("DET")) { return STATEMENT_UNPREPARED; } return STATEMENT_OTHER; }
From source file:com.openkm.util.FormatUtil.java
/** * Format the document size for human readers */// w ww . j av a 2 s . co m public static String formatSize(long bytes) { for (int i = 6; i > 0; i--) { double step = Math.pow(1024, i); if (bytes > step) return String.format(Locale.ROOT, "%3.1f %s", bytes / step, UNITS[i]); } return Long.toString(bytes) + " " + UNITS[0]; }