org.openbp.common.classloader
Class ResourceEntry

java.lang.Object
  extended by org.openbp.common.classloader.ResourceEntry

public class ResourceEntry
extends java.lang.Object

This class defines an entry in the class/resource table of the XClassLoader

Author:
Heiko Erhardt

Constructor Summary
ResourceEntry()
          Constructor.
ResourceEntry(java.net.URL repositoryUrl)
          Constructor.
ResourceEntry(java.net.URL repositoryUrl, byte[] content)
          Constructor.
 
Method Summary
protected  java.net.URL createURL()
          Creates an URL to this object.
 byte[] getBytes()
          Reads the resource from the repository.
 byte[] getContent()
          Gets the cached contents of the entry.
 java.net.URL getRepositoryUrl()
          Gets the name of the repository this entry belongs to.
 void setContent(byte[] content)
          Sets the cached contents of the entry.
 void setRepositoryUrl(java.net.URL repositoryUrl)
          Sets the name of the repository this entry belongs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceEntry

public ResourceEntry()
Constructor.


ResourceEntry

public ResourceEntry(java.net.URL repositoryUrl)
Constructor.

Parameters:
repositoryUrl - Name of the repository this entry belongs to

ResourceEntry

public ResourceEntry(java.net.URL repositoryUrl,
                     byte[] content)
Constructor.

Parameters:
repositoryUrl - Name of the repository this entry belongs to
content - Cached contents of the entry
Method Detail

getRepositoryUrl

public java.net.URL getRepositoryUrl()
Gets the name of the repository this entry belongs to.


setRepositoryUrl

public void setRepositoryUrl(java.net.URL repositoryUrl)
Sets the name of the repository this entry belongs to.


getContent

public byte[] getContent()
Gets the cached contents of the entry.


setContent

public void setContent(byte[] content)
Sets the cached contents of the entry.


getBytes

public byte[] getBytes()
Reads the resource from the repository.

Returns:
Bytes that define the content of the entry (i. e. the class code)

createURL

protected java.net.URL createURL()
Creates an URL to this object.

Returns:
The URL string or null on error


Copyright © 2011. All Rights Reserved.