org.objectweb.jorm.util.io.api
Interface PathExplorer

All Known Implementing Classes:
DirJavaExplorer

public interface PathExplorer

PathExplorer interface defines methods to create object able to manage a list of paths and furnish input and output stream on files


Method Summary
 void addPath(java.util.Collection path)
          creates the paths with the given path
 void addPath(java.lang.String cpath)
          adds a classpath and its path separator to the current explorer.
 java.lang.String getClassPath()
           
 java.io.InputStream getInputStream(java.lang.String file)
          gets an input stream from a given file.
 java.io.OutputStream getOutputStream(java.lang.String file)
          gets an output stream from a given file.
 

Method Detail

addPath

public void addPath(java.lang.String cpath)
adds a classpath and its path separator to the current explorer. This classpath is added to the list of path already defines.

Parameters:
cpath - the classpath which contains a list of paths

addPath

public void addPath(java.util.Collection path)
creates the paths with the given path

Parameters:
path - the vector of paths (which are String).

getInputStream

public java.io.InputStream getInputStream(java.lang.String file)
gets an input stream from a given file. This file is opened from the defined path.

Parameters:
file - the string representation of the name of the file
Returns:
an InputStream for the given file

getOutputStream

public java.io.OutputStream getOutputStream(java.lang.String file)
gets an output stream from a given file. This file is opened from the defined path.

Parameters:
file - the string representation of the name of the file
Returns:
an OutputStream for the given file

getClassPath

public java.lang.String getClassPath()