예제 #1
0
 public static int getVersion() {
   final URL src;
   try {
     src = getResourceURL(Paths.Resources.VERSION);
   } catch (final MalformedURLException ignored) {
     return -1;
   }
   return Integer.parseInt(IOHelper.readString(src).trim());
 }
예제 #2
0
파일: DRM.java 프로젝트: Latency/UtopianBot
 public static String getServiceKey() {
   final File key = new File(Configuration.Paths.getServiceKey());
   if (key.exists() && key.canRead()) return StringUtil.newStringUtf8(IOHelper.read(key));
   return DEFAULTKEY;
 }