net.kano.joscar
Class FileWritable

java.lang.Object
  extended bynet.kano.joscar.FileWritable
All Implemented Interfaces:
LiveWritable

public class FileWritable
extends java.lang.Object
implements LiveWritable

Provides an efficient means of using the contents of a file as a LiveWritable.

See Also:
LiveWritable

Constructor Summary
FileWritable(java.lang.String filename)
          Creates a new Writable that will write the contents of the given file on command.
 
Method Summary
 java.lang.String getFilename()
          Returns the file to be written by this object.
 void write(java.io.OutputStream out)
          Writes the contents of this object's file (getFile()) to the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileWritable

public FileWritable(java.lang.String filename)
Creates a new Writable that will write the contents of the given file on command.

Parameters:
filename - the file whose contents should be written
Method Detail

getFilename

public final java.lang.String getFilename()
Returns the file to be written by this object.

Returns:
the file that this object represents

write

public final void write(java.io.OutputStream out)
                 throws java.io.IOException
Writes the contents of this object's file (getFile()) to the given stream.

Specified by:
write in interface LiveWritable
Parameters:
out - the stream to which to write the file's contents
Throws:
java.io.IOException - if an I/O error occurs