com.sun.jini.tool
Class JarWrapper.SourceJarURL

java.lang.Object
  extended by com.sun.jini.tool.JarWrapper.SourceJarURL
Enclosing class:
JarWrapper

private static class JarWrapper.SourceJarURL
extends Object

Represents URL to a source JAR file. Source JAR URLs must be relative, and may contain HTTPMD digests.


Field Summary
(package private)  String algorithm
          HTTPMD digest algorithm, or null if non-HTTPMD URL
private  File baseDir
          Base directory associated with relative path for JAR file, only set in case the flatten classpath option is used.
(package private)  String comment
          HTTPMD digest comment, or null if non-HTTPMD URL
(package private)  String digest
          HTTPMD digest value, or null if non-HTTPMD URL
private static Pattern httpmdPattern
           
(package private)  String path
          URL path component, excluding any HTTPMD information
(package private)  String raw
          raw URL string, including HTTPMD information (if any)
 
Constructor Summary
JarWrapper.SourceJarURL(String raw)
          Creates SourceJarURL based on given raw URL string.
JarWrapper.SourceJarURL(String raw, File baseDir)
          Creates SourceJarURL based on given raw URL string that has an individual associated base directory.
JarWrapper.SourceJarURL(String path, String algorithm, String digest, String comment)
          Creates SourceJarURL based on given components.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
(package private)  JarWrapper.SourceJarURL resolve(JarWrapper.SourceJarURL other)
          Resolves given URL relative to this URL.
(package private)  File toFile()
          Returns file represented by this URL.
(package private)  File toFile(File base)
          Returns file represented by this URL.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

httpmdPattern

private static final Pattern httpmdPattern

raw

final String raw
raw URL string, including HTTPMD information (if any)


path

final String path
URL path component, excluding any HTTPMD information


algorithm

final String algorithm
HTTPMD digest algorithm, or null if non-HTTPMD URL


digest

final String digest
HTTPMD digest value, or null if non-HTTPMD URL


comment

final String comment
HTTPMD digest comment, or null if non-HTTPMD URL


baseDir

private File baseDir
Base directory associated with relative path for JAR file, only set in case the flatten classpath option is used.

Constructor Detail

JarWrapper.SourceJarURL

JarWrapper.SourceJarURL(String raw)
                  throws IOException
Creates SourceJarURL based on given raw URL string.

Throws:
IOException

JarWrapper.SourceJarURL

JarWrapper.SourceJarURL(String raw,
                        File baseDir)
                  throws IOException
Creates SourceJarURL based on given raw URL string that has an individual associated base directory.

Throws:
IOException

JarWrapper.SourceJarURL

JarWrapper.SourceJarURL(String path,
                        String algorithm,
                        String digest,
                        String comment)
Creates SourceJarURL based on given components.

Method Detail

resolve

JarWrapper.SourceJarURL resolve(JarWrapper.SourceJarURL other)
Resolves given URL relative to this URL.


toFile

File toFile()
Returns file represented by this URL.


toFile

File toFile(File base)
Returns file represented by this URL.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.