Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.util
Class InMemoryResource  view InMemoryResource download InMemoryResource.java

java.lang.Object
  extended byorg.springframework.core.io.AbstractResource
      extended byorg.acegisecurity.util.InMemoryResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class InMemoryResource
extends org.springframework.core.io.AbstractResource

An in memory implementation of Spring's org.springframework.core.io.Resource interface.

Used by the "Acegifier" web application to create a bean factory from an XML string, rather than a file.

Version:
$Id: InMemoryResource.java,v 1.3 2005/11/17 00:56:09 benalex Exp $

Field Summary
(package private)  java.lang.String description
           
(package private)  java.io.ByteArrayInputStream in
           
 
Constructor Summary
InMemoryResource(byte[] source)
           
InMemoryResource(byte[] source, java.lang.String description)
           
 
Method Summary
 java.lang.String getDescription()
          This abstract method declaration shadows the method in the Resource interface.
 java.io.InputStream getInputStream()
          Return an InputStream.
 
Methods inherited from class org.springframework.core.io.AbstractResource
createRelative, equals, exists, getFile, getFilename, getURL, hashCode, isOpen, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

in

java.io.ByteArrayInputStream in

description

java.lang.String description
Constructor Detail

InMemoryResource

public InMemoryResource(byte[] source)

InMemoryResource

public InMemoryResource(byte[] source,
                        java.lang.String description)
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from class: org.springframework.core.io.AbstractResource
This abstract method declaration shadows the method in the Resource interface. This is necessary to make the toString implementation in this class work on Sun's JDK 1.3 classic VM, which can't find the getDescription method when executing toString else.


getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: org.springframework.core.io.InputStreamSource
Return an InputStream. It is expected that each call creates a fresh stream.