2.17.2: 2011-06-17

net.sf.basedb.util.bfs
Interface InputStreamLocator

All Known Implementing Classes:
BaseInputStreamLocator, DiskInputStreamLocator

public interface InputStreamLocator

Defines a generic interface for opening an input stream from a named resource. Implementations should know how to access a given resource and create a stream that reads data from the resource.

Version:
2.15
Author:
Nicklas
Last modified
$Date: 2010-01-29 14:34:03 +0100 (Fri, 29 Jan 2010) $

Method Summary
 InputStream getInputStream(String name)
          Create an input stream that reads data from the given named resource.
 long getSize(String name)
          Get the size in bytes of the given named resource.
 

Method Detail

getInputStream

InputStream getInputStream(String name)
                           throws IOException
Create an input stream that reads data from the given named resource.

Parameters:
name - The name (for example a file name) of the resource
Returns:
An input stream
Throws:
IOException - If there is any problem with locating or opening the resource

getSize

long getSize(String name)
Get the size in bytes of the given named resource.

Parameters:
name - The name (for example a file name) of the resouce
Returns:
The size in bytes, or -1 if not known

2.17.2: 2011-06-17