Package org.apache.tomcat.jakartaee
Class Util
- java.lang.Object
-
- org.apache.tomcat.jakartaee.Util
-
public class Util extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopy(InputStream is, OutputStream os)static StringgetExtension(String filename)Get the extension of a filenamestatic StringtoString(InputStream is, Charset charset)
-
-
-
Method Detail
-
getExtension
public static String getExtension(String filename)
Get the extension of a filenameThe extension is the string after the last '
.' in the filename.- Parameters:
filename- the name of the file- Returns:
- the extension or an empty string, if no dot is found in the filename
-
copy
public static void copy(InputStream is, OutputStream os) throws IOException
- Throws:
IOException
-
toString
public static String toString(InputStream is, Charset charset) throws IOException
- Throws:
IOException
-
-