com.ldodds.foafamatic.load
Class FileLoader

java.lang.Object
  |
  +--com.ldodds.foafamatic.load.FileLoader
All Implemented Interfaces:
Loader
Direct Known Subclasses:
FOAFLoader, VCardLoader

public abstract class FileLoader
extends java.lang.Object
implements Loader

Abstract base class for objects that load data from the file system or the net.

Author:
ldodds

Constructor Summary
FileLoader()
          Constructor for FileLoader.
 
Method Summary
 void load()
          Will present the user with the option to load from the file system or the network.
abstract  void loadData(java.io.InputStream in)
          Should be implemented by sub-classes to actually perform the data load.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLoader

public FileLoader()
Constructor for FileLoader.

Method Detail

load

public void load()
Will present the user with the option to load from the file system or the network. If they choose the file system then they will be able to select the actual file.

Specified by:
load in interface Loader

loadData

public abstract void loadData(java.io.InputStream in)
Should be implemented by sub-classes to actually perform the data load. An InputStream will automatically be created from the users choice (whether the file system or URL) and passed as a parameter to this method

Parameters:
in - An InputStream from which the data can be read. Guaranteed not to be null. The stream will be closed by the base class.