at.molindo.utils.io
Class FileUtils
java.lang.Object
at.molindo.utils.io.FileUtils
public class FileUtils
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extension
public static String extension(File file)
- Returns:
- normalized (trimmed, lower case) extension of file including last
'.' or empty string (e.g. "foo.tar.gz" => ".gz")
extension
public static String extension(String fileName)
extensionFull
public static String extensionFull(File file)
- Returns:
- normalized (trimmed, lower case) full extension of file including
first '.' or empty string (e.g. "foo.tar.gz" => ".tar.gz")
extensionFull
public static String extensionFull(String fileName)
in
public static InputStream in(File file,
Compression compression)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
out
public static OutputStream out(File file,
Compression compression)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
read
public static BufferedReader read(File file,
Compression compression)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
write
public static BufferedWriter write(File file,
Compression compression)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
bytes
public static byte[] bytes(File file)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
bytes
public static byte[] bytes(File file,
Compression compression)
throws FileNotFoundException,
IOException
- Throws:
FileNotFoundException
IOException
compression
public static Compression compression(File file)
compression
public static Compression compression(String name)
- Parameters:
name - name of a file
- Returns:
- never
null, never Compression.AUTO
Copyright © 2011 Molindo GmbH. All Rights Reserved.