nesstar.util
Class ResourceReader

java.lang.Object
  extended by nesstar.util.ResourceReader

public class ResourceReader
extends Object

A class that reads the resources from file. It will locate the test/nesstar/resource catalog itself, so the user must add the rest of the path and filename.

Version:
CVS revision $Revision: 1.2 $
Author:
Magne Skjeret

Constructor Summary
ResourceReader()
           
 
Method Summary
static byte[] readFile(String path)
          A method that reads a resource.
static void writeFile(String path, String content)
          A convinience method to write the test result to a file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceReader

public ResourceReader()
Method Detail

readFile

public static byte[] readFile(String path)
A method that reads a resource. It makes the assumption that it starts in CVSROOT/ejbserver

Returns:
The file read in a byte array

writeFile

public static void writeFile(String path,
                             String content)
                      throws IOException
A convinience method to write the test result to a file

Parameters:
path - The path to the file starting at test/nesstar/resources/
content - The content to write
Throws:
IOException - If something has gone wrong during writing to file

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved