public class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(InputStream is,
OutputStream os)
Buffered copy.
|
static String |
getExtension(String filename)
Get the extension of a filename
|
static String |
toString(InputStream is,
Charset charset)
Convert the input bytes as a string.
|
public static String getExtension(String filename)
The extension is the string after the last '.' in the filename.
filename - the name of the filepublic static void copy(InputStream is, OutputStream os) throws IOException
is - the inputos - the outputIOException - if an exception occurspublic static String toString(InputStream is, Charset charset) throws IOException
is - the input byte streamcharset - the charset to useIOException - if an exception occursCopyright © 2020–2022 The Apache Software Foundation. All rights reserved.