org.apache.rat.test.utils
Class Resources

java.lang.Object
  extended by org.apache.rat.test.utils.Resources

public class Resources
extends java.lang.Object

Utility class, which provides static methods for creating test cases.


Method Summary
static java.io.BufferedReader getBufferedResourceReader(java.lang.String pResource)
          Locates a resource file in the class path and returns a BufferedReader.
static java.lang.String getResourceDirectory(java.lang.String pResource)
          Locates the name of a directory, which contains the given resource file.
static java.io.File getResourceFile(java.lang.String pResource)
          Locates a resource file in the class path.
static java.io.Reader getResourceReader(java.lang.String pResource)
          Locates a resource file in the class path and returns a Reader.
static java.io.InputStream getResourceStream(java.lang.String pResource)
          Locates a resource file in the class path and returns an InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResourceFile

public static java.io.File getResourceFile(java.lang.String pResource)
                                    throws java.io.IOException
Locates a resource file in the class path.

Throws:
java.io.IOException

getResourceStream

public static java.io.InputStream getResourceStream(java.lang.String pResource)
                                             throws java.io.IOException
Locates a resource file in the class path and returns an InputStream.

Throws:
java.io.IOException

getResourceReader

public static java.io.Reader getResourceReader(java.lang.String pResource)
                                        throws java.io.IOException
Locates a resource file in the class path and returns a Reader.

Throws:
java.io.IOException

getBufferedResourceReader

public static java.io.BufferedReader getBufferedResourceReader(java.lang.String pResource)
                                                        throws java.io.IOException
Locates a resource file in the class path and returns a BufferedReader.

Throws:
java.io.IOException

getResourceDirectory

public static java.lang.String getResourceDirectory(java.lang.String pResource)
                                             throws java.io.IOException
Locates the name of a directory, which contains the given resource file.

Throws:
java.io.IOException


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.