Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.vfs
Class FileUtil

    java.lang.Object
      org.apache.commons.vfs.FileUtil

public class FileUtil
extends Object

Utility methods for dealng with FileObjects.

Version:
  $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
  Adam Murdoch

Method Summary
`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 outstr)` Writes the content of a file to an OutputStream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getContent

    public static byte[] getContent(FileObject file)
                             throws IOException

  Returns the content of a file, as a byte array.

  Parameters:
    `file` - The file to get the content of.
  Throws:
    `IOException`

### writeContent

    public static void writeContent(FileObject file,
                                    OutputStream outstr)
                             throws IOException

  Writes the content of a file to an OutputStream.

  Throws:
    `IOException`

### copyContent

    public static void copyContent(FileObject srcFile,
                                   FileObject destFile)
                            throws IOException

  Copies the content from a source file to a destination file.

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.