org.apache.avalon.meta.info.locator
Interface ResourceLocator


public interface ResourceLocator

ResourceLocator provides an interface for the readers and writers to get i9nput and output streams relative to a type.

Version:
CVS $Revision: 1.3 $
Author:
Avalon Development Team

Method Summary
 InputStream getInputStream(Type type, String key)
          Get the required stream based on type and resource identifier.
 OutputStream getOutputStream(Type type, String key)
          Get the required stream based on type and resource identifier.
 

Method Detail

getInputStream

public InputStream getInputStream(Type type,
                                  String key)
                           throws IOException
Get the required stream based on type and resource identifier.

Parameters:
type - The type defintion
key - The resource identifier
Returns:
the input stream
Throws:
MetaInfoException - if the stream does not exist or there is a problem obtaining it.
IOException

getOutputStream

public OutputStream getOutputStream(Type type,
                                    String key)
                             throws IOException
Get the required stream based on type and resource identifier.

Parameters:
type - The type defintion
key - The resource identifier
Returns:
the output stream
Throws:
MetaInfoException - if there is a problem obtaining it.
IOException


Copyright © The Apache Software Foundation. All Rights Reserved.