JACK 5.4 Application Interface

aos.util
Class PathEntry

java.lang.Object
  extended byaos.util.PathEntry

public class PathEntry
extends java.lang.Object

A utility class for dealing with the Java CLASSPATH. This is used to allow code to open a pathname and get an input stream that points to a file that could be located relative to anywhere within the CLASSPATH. This includes files that may reside within ZIP or JAR files that are in the CLASSPATH.


Constructor Summary
PathEntry()
           
 
Method Summary
static boolean exists(java.lang.String name)
          Check if the file can be found in the CLASSPATH.
static byte[] loadObject(java.io.InputStream is)
          Read an input-stream and return it as an array of bytes.
static byte[] loadObject(java.lang.String filename)
          First locate the given file in the CLASSPATH, then read the input-stream and return it as an array of bytes.
static java.io.InputStream open(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathEntry

public PathEntry()
Method Detail

open

public static java.io.InputStream open(java.lang.String name)

exists

public static boolean exists(java.lang.String name)
Check if the file can be found in the CLASSPATH.


loadObject

public static byte[] loadObject(java.io.InputStream is)
Read an input-stream and return it as an array of bytes.


loadObject

public static byte[] loadObject(java.lang.String filename)
First locate the given file in the CLASSPATH, then read the input-stream and return it as an array of bytes.


JACK 5.4 Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088