|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.compat.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 java.lang.String |
JAVA_1_0
|
static java.lang.String |
JAVA_1_1
|
static java.lang.String |
JAVA_1_2
|
static java.lang.String |
JAVA_1_3
|
static java.lang.String |
JAVA_1_4
|
static java.lang.String |
JAVA_1_5
|
Constructor Summary | |
protected |
JdkCompat()
Default no-arg constructor |
Method Summary | |
void |
chainException(java.lang.Throwable wrapper,
java.lang.Throwable wrapped)
Chains the wrapped throwable to the wrapper throwable. |
static java.lang.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. |
java.lang.String |
getPartialServletStackTrace(java.lang.Throwable t)
Print out a partial servlet stack trace (truncating at the last occurrence of javax.servlet.). |
java.net.ServerSocket |
getUnboundSocket(javax.net.ServerSocketFactory ssf)
Obtain an unbound socket from the ServerSocketFactory. |
java.net.URL |
getURI(java.io.File file)
Return the URI for the given file. |
static boolean |
isJava14()
|
static boolean |
isJava15()
|
static boolean |
isJava2()
|
java.lang.String[] |
split(java.lang.String path,
java.lang.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 java.lang.String JAVA_1_0
public static final java.lang.String JAVA_1_1
public static final java.lang.String JAVA_1_2
public static final java.lang.String JAVA_1_3
public static final java.lang.String JAVA_1_4
public static final java.lang.String JAVA_1_5
Constructor Detail |
protected JdkCompat()
Method Detail |
public static java.lang.String getJavaVersion()
public static boolean isJava2()
public static boolean isJava14()
public static boolean isJava15()
public static JdkCompat getJdkCompat()
public java.net.URL getURI(java.io.File file) throws java.net.MalformedURLException
file
- The file to wrap into URI
java.net.MalformedURLException
- Doh ;)public long getMaxMemory()
public java.lang.String getPartialServletStackTrace(java.lang.Throwable t)
public java.lang.String[] split(java.lang.String path, java.lang.String pat)
path
- String to splitpat
- Pattern to split at
public void chainException(java.lang.Throwable wrapper, java.lang.Throwable wrapped)
wrapper
- The wrapper throwablewrapped
- The throwable to be wrappedpublic java.net.ServerSocket getUnboundSocket(javax.net.ServerSocketFactory ssf) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |