Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.opengl.util
Class Locator

    java.lang.Object
      com.sun.opengl.util.Locator

    public class Locator

extends Object

Utilities for dealing with resources.

Method Summary
`static String` | `getRelativeOf(String absoluteFileLocation, String relativeFile)` Generates a path for the 'relativeFile' relative to the 'absoluteFileLocation'
`static URL` | `getResource(Class context, String path)` Locates the resource using 'getResource(String path, ClassLoader cl)', with this context ClassLoader and the path as is, as well with the context's package name path plus the path.
`static URL` | `getResource(String path, ClassLoader cl)` Locates the resource using the ClassLoader's facility, the absolute URL and absolute file.
`static boolean` | `urlExists(URL url)` Returns true, if the url exists, trying to open a connection.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getResource

    public static URL getResource(Class context,
                                  String path)

  Locates the resource using 'getResource(String path, ClassLoader cl)', with this context ClassLoader and the path as is, as well with the context's package name path plus the path.

  See Also:
    `getResource(String, ClassLoader)`

### getResource

    public static URL getResource(String path,
                                  ClassLoader cl)

  Locates the resource using the ClassLoader's facility, the absolute URL and absolute file.

  See Also:
    `ClassLoader.getResource(String)`, `ClassLoader.getSystemResource(String)`, `URL.URL(String)`, `File.File(String)`

### getRelativeOf

    public static String getRelativeOf(String absoluteFileLocation,
                                       String relativeFile)

  Generates a path for the 'relativeFile' relative to the 'absoluteFileLocation'

### urlExists

    public static boolean urlExists(URL url)

  Returns true, if the url exists, trying to open a connection.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.