Package org.apache.commons.vfs
Class FileUtil
- java.lang.Object
-
- org.apache.commons.vfs.FileUtil
-
public class FileUtil extends java.lang.Object
Utility methods for dealng with FileObjects.- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copyContent(FileObject srcFile, FileObject destFile)
Copies the content from a source file to a destination file.static byte[]
getContent(FileObject file)
Returns the content of a file, as a byte array.static void
writeContent(FileObject file, java.io.OutputStream outstr)
Writes the content of a file to an OutputStream.
-
-
-
Method Detail
-
getContent
public static byte[] getContent(FileObject file) throws java.io.IOException
Returns the content of a file, as a byte array.- Parameters:
file
- The file to get the content of.- Throws:
java.io.IOException
-
writeContent
public static void writeContent(FileObject file, java.io.OutputStream outstr) throws java.io.IOException
Writes the content of a file to an OutputStream.- Throws:
java.io.IOException
-
copyContent
public static void copyContent(FileObject srcFile, FileObject destFile) throws java.io.IOException
Copies the content from a source file to a destination file.- Throws:
java.io.IOException
-
-