org.jrabbit.base.data.loading
Interface Loader

All Known Implementing Classes:
FileLoader, SystemLoader, URLLoader

public interface Loader

A general convenience object for loading data from external locations. Depending on the implementation, accessing the data may fail. In these instances, it's recommended that the Loader return null.

Author:
Chris Molini

Method Summary
 java.io.File file()
          Accesses a the target data via File object.
 java.lang.String path()
          Accesses the path to the object in String form.
 java.io.InputStream stream()
          Accesses the target data via stream.
 java.lang.String type()
          Learn the type of the data being accessed.
 java.net.URL url()
          Accesses the target data via URL.
 

Method Detail

path

java.lang.String path()
Accesses the path to the object in String form.

Returns:
A String representation of the path to the object.

stream

java.io.InputStream stream()
Accesses the target data via stream.

Returns:
An InputStream from the file.

url

java.net.URL url()
Accesses the target data via URL.

Returns:
A URL to the file.

file

java.io.File file()
Accesses a the target data via File object.

Returns:
A File reference to the data.

type

java.lang.String type()
Learn the type of the data being accessed.

Returns:
The type of the data being accessed. The returned String should be in all caps for simplicity.