org.fcrepo.server.journal.readerwriter.multicast
Class TransportOutputFile

java.lang.Object
  extended by org.fcrepo.server.journal.readerwriter.multicast.TransportOutputFile

public class TransportOutputFile
extends Object

Title: TransportOutputFile.java

Description: A "renaming" journal file, for use by Transports.

When this file is created, a prefix is put on the filename to show that output is in progress. When the file is closed, it is renamed to remove the prefix.

Version:
$Id: TransportOutputFile.java,v 1.3 2007/06/01 17:21:31 jblake Exp $
Author:
jblake

Constructor Summary
TransportOutputFile(File directory, String name)
          Sture the filename, and the "in process" filename.
 
Method Summary
 void close()
          Close the writer and rename the file.
 String getName()
          Did somebody ask who we are?
 Writer open()
          Create the file with its "in progress" filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportOutputFile

public TransportOutputFile(File directory,
                           String name)
                    throws IOException
Sture the filename, and the "in process" filename.

Throws:
IOException - if either file already exists.
Method Detail

open

public Writer open()
            throws IOException
Create the file with its "in progress" filename.

Returns:
a Writer on the new file.
Throws:
IOException

close

public void close()
           throws IOException
Close the writer and rename the file.

Throws:
IOException

getName

public String getName()
Did somebody ask who we are?



Copyright © 2011 DuraSpace. All Rights Reserved.