org.jppf.io
Class FileInputSource

java.lang.Object
  extended by org.jppf.io.ChannelInputSource
      extended by org.jppf.io.FileInputSource
All Implemented Interfaces:
Closeable, InputSource, IO

public class FileInputSource
extends ChannelInputSource

Input source backed by a file.

Author:
Laurent Cohen

Field Summary
 
Fields inherited from class org.jppf.io.ChannelInputSource
channel
 
Constructor Summary
FileInputSource(File file)
          Initialize this file input source with the specified file.
FileInputSource(String path)
          Initialize this file input source with the specified file path.
 
Method Summary
 void close()
          Close this input source and release any system resources associated with it.
 
Methods inherited from class org.jppf.io.ChannelInputSource
read, read, readInt, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileInputSource

public FileInputSource(String path)
                throws Exception
Initialize this file input source with the specified file path.

Parameters:
path - the path to the file to read from.
Throws:
Exception - if an IO error occurs.

FileInputSource

public FileInputSource(File file)
                throws Exception
Initialize this file input source with the specified file.

Parameters:
file - the file to read from.
Throws:
Exception - if an IO error occurs.
Method Detail

close

public void close()
           throws IOException
Close this input source and release any system resources associated with it.

Specified by:
close in interface Closeable
Overrides:
close in class ChannelInputSource
Throws:
IOException - if an IO error occurs.
See Also:
Closeable.close()


Copyright © 2005-2010 JPPF Team.