org.apache.tomcat.util.compat

Class Jdk14Compat


public class Jdk14Compat
extends JdkCompat

See JdkCompat. This is an extension of that class for Jdk1.4 support.

Authors:
Tim Funk
Remy Maucherat

Field Summary

Fields inherited from class org.apache.tomcat.util.compat.JdkCompat

JAVA_1_0, JAVA_1_1, JAVA_1_2, JAVA_1_3, JAVA_1_4, JAVA_1_5

Constructor Summary

Jdk14Compat()
Default no-arg constructor

Method Summary

void
chainException(Throwable wrapper, Throwable wrapped)
Chains the wrapped throwable to the wrapper throwable.
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.
String[]
split(String path, String pat)
Splits a string into it's components.

Methods inherited from class org.apache.tomcat.util.compat.JdkCompat

chainException, getJavaVersion, getJdkCompat, getMaxMemory, getPartialServletStackTrace, getURI, isJava14, isJava15, isJava2, split

Constructor Details

Jdk14Compat

protected Jdk14Compat()
Default no-arg constructor

Method Details

chainException

public void chainException(Throwable wrapper,
                           Throwable wrapped)
Chains the wrapped throwable to the wrapper throwable.
Overrides:
chainException in interface JdkCompat

Parameters:
wrapper - The wrapper throwable
wrapped - The throwable to be wrapped


getMaxMemory

public long getMaxMemory()
Return the maximum amount of memory the JVM will attempt to use.
Overrides:
getMaxMemory in interface JdkCompat


getPartialServletStackTrace

public String getPartialServletStackTrace(Throwable t)
Print out a partial servlet stack trace (truncating at the last occurrence of javax.servlet.).
Overrides:
getPartialServletStackTrace in interface JdkCompat


getURI

public URL getURI(File file)
            throws MalformedURLException
Return the URI for the given file. Originally created for o.a.c.loader.WebappClassLoader
Overrides:
getURI in interface JdkCompat

Parameters:

Returns:
A URI as a URL


split

public String[] split(String path,
                      String pat)
Splits a string into it's components.
Overrides:
split in interface JdkCompat

Parameters:
path - String to split
pat - Pattern to split at

Returns:
the components of the path


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.