|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tomcat.util.compat.JdkCompat
public class JdkCompat
General-purpose utility to provide backward-compatibility and JDK independence. This allow use of JDK1.3 ( or higher ) facilities if available, while maintaining the code compatible with older VMs. The goal is to make backward-compatiblity reasonably easy. The base class supports JDK1.3 behavior.
| Field Summary | |
|---|---|
static String |
JAVA_1_0
|
static String |
JAVA_1_1
|
static String |
JAVA_1_2
|
static String |
JAVA_1_3
|
static String |
JAVA_1_4
|
| Constructor Summary | |
|---|---|
protected |
JdkCompat()
Default no-arg constructor |
| Method Summary | |
|---|---|
static String |
getJavaVersion()
Return java version as a string |
static JdkCompat |
getJdkCompat()
Get a compatibiliy helper class. |
long |
getMaxMemory()
Return the maximum amount of memory the JVM will attempt to use. |
String |
getPartialServletStackTrace(Throwable t)
Print out a partial servlet stack trace (truncating at the last occurrence of javax.servlet.). |
URL |
getURI(File file)
Return the URI for the given file. |
static boolean |
isJava14()
|
static boolean |
isJava2()
|
String[] |
split(String path,
String pat)
Splits a string into it's components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JAVA_1_0
public static final String JAVA_1_1
public static final String JAVA_1_2
public static final String JAVA_1_3
public static final String JAVA_1_4
| Constructor Detail |
|---|
protected JdkCompat()
| Method Detail |
|---|
public static String getJavaVersion()
public static boolean isJava2()
public static boolean isJava14()
public static JdkCompat getJdkCompat()
public URL getURI(File file)
throws MalformedURLException
File - to wrap into URI
MalformedURLExceptionpublic long getMaxMemory()
public String getPartialServletStackTrace(Throwable t)
public String[] split(String path,
String pat)
path - String to splitpat - Pattern to split at
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||