Methods Summary |
---|
public long | getMaxMemory()Return the maximum amount of memory the JVM will attempt to use.
return Runtime.getRuntime().maxMemory();
|
public java.lang.String | getPartialServletStackTrace(java.lang.Throwable t)Print out a partial servlet stack trace (truncating at the last
occurrence of javax.servlet.).
StringBuffer trace = new StringBuffer();
trace.append(t.toString()).append('\n");
StackTraceElement[] elements = t.getStackTrace();
int pos = elements.length;
for (int i = 0; i < elements.length; i++) {
if ((elements[i].getClassName().startsWith
("org.apache.catalina.core.ApplicationFilterChain"))
&& (elements[i].getMethodName().equals("internalDoFilter"))) {
pos = i;
}
}
for (int i = 0; i < pos; i++) {
if (!(elements[i].getClassName().startsWith
("org.apache.catalina.core."))) {
trace.append('\t").append(elements[i].toString()).append('\n");
}
}
return trace.toString();
|
public java.net.URL | getURI(java.io.File file)Return the URI for the given file. Originally created for
o.a.c.loader.WebappClassLoader
File realFile = file;
try {
realFile = realFile.getCanonicalFile();
} catch (IOException e) {
// Ignore
}
return realFile.toURI().toURL();
|
public java.lang.String[] | split(java.lang.String path, java.lang.String pat)
return path.split(pat);
|