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 (fr, 29 jan 2010) $
  • Method Summary

    Modifier and Type
    Method
    Description
    Create an input stream that reads data from the given named resource.
    long
    Get the size in bytes of the given named resource.
  • Method Details

    • 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