Rio Project 4.2 API Documentation



org.rioproject.opstring
Class OARUtil

java.lang.Object
  extended by org.rioproject.opstring.OARUtil

public class OARUtil
extends Object

Utilities for working with OperationalString Archives (OARs)

Author:
Dennis Reedy

Constructor Summary
OARUtil()
           
 
Method Summary
static File find(String name, File dir)
          Find a file in an extracted OAR directory
static OAR getOAR(File dir)
          Find the OAR file and return an OAR object
static void install(File oarFile, File installDir)
          Install an OAR
static DownloadRecord install(URL archive, File installDir)
          Install an OAR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OARUtil

public OARUtil()
Method Detail

install

public static DownloadRecord install(URL archive,
                                     File installDir)
                              throws IOException,
                                     OARException
Install an OAR

Parameters:
archive - The URL of the archive
installDir - The parent directory to install the archive into
Returns:
A DownloadRecord detailing the installation specifics
Throws:
OARException - If the manifest cannot be read
IOException - If there are errors accessing the file system or the archive parameter

install

public static void install(File oarFile,
                           File installDir)
                    throws IOException,
                           OARException
Install an OAR

Parameters:
oarFile - The OAR File
installDir - The parent directory to install the archive into
Throws:
OARException - If the manifest cannot be read
IOException - If there are errors accessing the file system or the archive parameter

getOAR

public static OAR getOAR(File dir)
                  throws IOException,
                         OARException
Find the OAR file and return an OAR object

Parameters:
dir - The directory to search
Returns:
If an OAR file is found, return an OAR object
Throws:
OARException - If the manifest cannot be read
IOException - if there are errors accessing the file system

find

public static File find(String name,
                        File dir)
Find a file in an extracted OAR directory

Parameters:
name - The filename to find. If the first character of the name is '*', then the match will be the first file that ends with the remaining string
dir - The parent directory to start the search from
Returns:
The file, or null if not found

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.