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

## org.jini.rio.watch
Class FileArchive

    java.lang.Object
      org.jini.rio.watch.QueuedArchive
          org.jini.rio.watch.FileArchive

All Implemented Interfaces:
  Archivable

    public class FileArchive

extends QueuedArchive

The FileArchive provides an implementation of a QueuedArchive, writing results to a file

Constructor Summary
`FileArchive()`
`FileArchive(File file)` Creates new FileArchive using the File
`FileArchive(File file, boolean appendFlag)` Creates new FileArchive
`FileArchive(PrintWriter writer)` Creates new FileArchive
`FileArchive(String filename)` Creates new FileArchive
`FileArchive(String filename, boolean appendFlag)` Creates new FileArchive

Method Summary
`void` | `archiveToResource(Calculable calculable)` Performs the actual write to the underlying resource
`void` | `closeResource()` Closes the underlying Resource
`String` | `getAppend()` Getter for property append.
`String` | `getFilename()` Getter for property filename.
`void` | `initialize()`
`boolean` | `isAppendFlag()` Getter for property appendFlag.
`void` | `setAppend(String append)` Setter for property append.
`void` | `setAppendFlag(boolean appendFlag)` Setter for property appendFlag.
`void` | `setFilename(String filename)` Setter for property filename.

Methods inherited from class org.jini.rio.watch.QueuedArchive
`archive, close`

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

Constructor Detail

### FileArchive

    public FileArchive()

### FileArchive

    public FileArchive(String filename)
                throws IOException

  Creates new FileArchive

  Parameters:
    `filename` - The name of the file to create and archive to
  Throws:
    `IOException` - if there are problems creating the file

### FileArchive

    public FileArchive(String filename,
                       boolean appendFlag)
                throws IOException

  Creates new FileArchive

  Parameters:
    `filename` - The name of the file to create and archive to
    `appendFlag` - if true, then data will be written to the end of the file rather than the beginning
  Throws:
    `IOException` - If there are errors creating the file

### FileArchive

    public FileArchive(File file)
                throws IOException

  Creates new FileArchive using the File

  Parameters:
    `file` - The File to archive to
  Throws:
    `IOException` - If there are errors creating the file

### FileArchive

    public FileArchive(File file,
                       boolean appendFlag)
                throws IOException

  Creates new FileArchive

  Parameters:
    `file` - The File to archive to
    `appendFlag` - if true, then data will be written to the end of the file rather than the beginning
  Throws:
    `IOException` - If there are errors creating the file

### FileArchive

    public FileArchive(PrintWriter writer)

  Creates new FileArchive

  Parameters:
    `writer` - The PrintWriter for output use

Method Detail

### initialize

    public void initialize()
                    throws IOException

  Throws:
    `IOException`

### archiveToResource

    public void archiveToResource(Calculable calculable)
                           throws IOException

  Performs the actual write to the underlying resource

  Specified by:
    `archiveToResource` in class `QueuedArchive`
  Parameters:
    `calculable` - the Calculable record to archive
  Throws:
    `IOException` - if the write encounters errors

### closeResource

    public void closeResource()

  Closes the underlying Resource

  Specified by:
    `closeResource` in class `QueuedArchive`

### getFilename

    public String getFilename()

  Getter for property filename.

  Returns:
    Value of property filename.

### setFilename

    public void setFilename(String filename)

  Setter for property filename.

  Parameters:
    `filename` - New value of property filename.

### getAppend

    public String getAppend()

  Getter for property append.

  Returns:
    Value of property append.

### setAppend

    public void setAppend(String append)

  Setter for property append.

  Parameters:
    `append` - New value of property append.

### isAppendFlag

    public boolean isAppendFlag()

  Getter for property appendFlag.

  Returns:
    Value of property appendFlag.

### setAppendFlag

    public void setAppendFlag(boolean appendFlag)

  Setter for property appendFlag.

  Parameters:
    `appendFlag` - New value of property appendFlag.

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

Copyright © Project Rio.