Resource (Tomcat API Documentation)
Keywords: org.apache.naming.resources.Resource class

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

## org.apache.naming.resources
Class Resource

    java.lang.Object
      org.apache.naming.resources.Resource

Direct Known Subclasses:
  FileDirContext.FileResource, WARDirContext.WARResource

    public class Resource

extends java.lang.Object

Encapsultes the contents of a resource.

Version:
  $Revision: 467222 $
Author:
  Remy Maucherat

Field Summary
`protected byte[]` | `binaryContent` Binary content.
`protected java.io.InputStream` | `inputStream` Input stream.

Constructor Summary
`Resource()`
`Resource(byte[] binaryContent)`
`Resource(java.io.InputStream inputStream)`

Method Summary
`byte[]` | `getContent()` Content accessor.
`void` | `setContent(byte[] binaryContent)` Content mutator.
`void` | `setContent(java.io.InputStream inputStream)` Content mutator.
`java.io.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 java.io.InputStream inputStream

  Input stream.

Constructor Detail

### Resource

    public Resource()

### Resource

    public Resource(java.io.InputStream inputStream)

### Resource

    public Resource(byte[] binaryContent)

Method Detail

### streamContent

    public java.io.InputStream streamContent()
                                      throws java.io.IOException

  Content accessor.

  Returns:
    InputStream
  Throws:
    `java.io.IOException`

### getContent

    public byte[] getContent()

  Content accessor.

  Returns:
    binary content

### setContent

    public void setContent(java.io.InputStream inputStream)

  Content mutator.

  Parameters:
    `inputStream` - New input stream

### setContent

    public void setContent(byte[] binaryContent)

  Content mutator.

  Parameters:
    `binaryContent` - New bin content

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

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