public final class FileUtil extends Object
| Modifier and Type | Method and 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,
OutputStream output)
Writes the content of a file to an OutputStream.
|
public static byte[] getContent(FileObject file) throws IOException
file - The file to get the content of.IOException - if the file content cannot be accessed.public static void writeContent(FileObject file, OutputStream output) throws IOException
file - The FileObject to write.output - The OutputStream to write to.IOException - if an error occurs writing the file.FileContent.write(OutputStream)public static void copyContent(FileObject srcFile, FileObject destFile) throws IOException
srcFile - The source FileObject.destFile - The target FileObjectIOException - If an error occurs copying the file.FileContent.write(FileContent),
FileContent.write(FileObject)Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.