01: package com.icesoft.faces.application;
02:
03: public class StartupTime {
04:
05: private static long started = System.currentTimeMillis();;
06: private static String inc = "/" + started + "/";
07:
08: public static long getStartupTime() {
09: return started;
10: }
11:
12: public static String getStartupInc() {
13: return inc;
14: }
15:
16: public static String removeStartupTimeFromPath(String path) {
17: return getPath(path, inc);
18: }
19:
20: private static String getPath(String path, String inc) {
21: int start = path.indexOf(inc);
22: if (start == -1)
23: return path;
24: int end = start + inc.length() - 1;
25: if (start > 0) {
26: String stringStart = path.substring(0, start);
27: String stringEnd = path.substring(end);
28: path = stringStart + stringEnd;
29: } else {
30: path = path.substring(end);
31: }
32: return path;
33: }
34: }
|