org.openbp.common.classloader
Class BinaryResourceSpec

java.lang.Object
  extended by org.openbp.common.classloader.UrlResourceSpec
      extended by org.openbp.common.classloader.BinaryResourceSpec
All Implemented Interfaces:
ResourceSpec
Direct Known Subclasses:
FileBinaryResourceSpec, JarBinaryResourceSpec

public abstract class BinaryResourceSpec
extends UrlResourceSpec

XClassLoader resource specification that directly provides its contents as byte array. The UrlResourceSpec.setUrl(URL) may specify the source of the binary content.

Author:
Heiko Erhardt

Field Summary
 byte[] content
          Binary content
 
Constructor Summary
BinaryResourceSpec()
          Default constructor.
BinaryResourceSpec(java.net.URL url)
          Value constructor.
BinaryResourceSpec(java.net.URL url, byte[] content)
          Value constructor.
 
Method Summary
 byte[] getContent()
          Gets the binary content.
 void setContent(byte[] content)
          Sets the binary content.
 java.net.URL toUrl()
          Gets the URL representation of this resource specification.
 
Methods inherited from class org.openbp.common.classloader.UrlResourceSpec
getUrl, setUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openbp.common.classloader.ResourceSpec
addEntriesToClassLoader
 

Field Detail

content

public byte[] content
Binary content

Constructor Detail

BinaryResourceSpec

public BinaryResourceSpec()
Default constructor.


BinaryResourceSpec

public BinaryResourceSpec(java.net.URL url)
Value constructor.

Parameters:
url - URL of the resource

BinaryResourceSpec

public BinaryResourceSpec(java.net.URL url,
                          byte[] content)
Value constructor.

Parameters:
url - URL of the resource
content - Binary content
Method Detail

getContent

public byte[] getContent()
Gets the binary content.


setContent

public void setContent(byte[] content)
Sets the binary content.


toUrl

public java.net.URL toUrl()
Gets the URL representation of this resource specification.

Specified by:
toUrl in interface ResourceSpec
Overrides:
toUrl in class UrlResourceSpec


Copyright © 2011. All Rights Reserved.