Apache Tomcat 7.0.28

org.apache.naming.resources
Class Resource

java.lang.Object
  extended by org.apache.naming.resources.Resource
Direct Known Subclasses:
FileDirContext.FileResource, WARDirContext.WARResource

public class Resource
extends Object

Encapsulates the contents of a resource.

Version:
$Revision: 1026163 $
Author:
Remy Maucherat

Field Summary
protected  byte[] binaryContent
          Binary content.
protected  InputStream inputStream
          Input stream.
 
Constructor Summary
Resource()
           
Resource(byte[] binaryContent)
           
Resource(InputStream inputStream)
           
 
Method Summary
 byte[] getContent()
          Content accessor.
 void setContent(byte[] binaryContent)
          Content mutator.
 void setContent(InputStream inputStream)
          Content mutator.
 InputStream streamContent()
          Content accessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

binaryContent

protected byte[] binaryContent
Binary content.


inputStream

protected InputStream inputStream
Input stream.

Constructor Detail

Resource

public Resource()

Resource

public Resource(InputStream inputStream)

Resource

public Resource(byte[] binaryContent)
Method Detail

streamContent

public InputStream streamContent()
                          throws IOException
Content accessor.

Returns:
InputStream
Throws:
IOException

getContent

public byte[] getContent()
Content accessor.

Returns:
binary content

setContent

public void setContent(InputStream inputStream)
Content mutator.

Parameters:
inputStream - New input stream

setContent

public void setContent(byte[] binaryContent)
Content mutator.

Parameters:
binaryContent - New bin content

Apache Tomcat 7.0.28

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.