org.mule.extras.spring.config
Class CachedResource

java.lang.Object
  extended byAbstractResource
      extended byorg.mule.extras.spring.config.CachedResource

public class CachedResource
extends AbstractResource

Spring 2.x is picky about open/closed input streams, as it requires a closed stream (fully read resource) to enable automatic validation detection (DTD or XSD). Otherwise, a caller has to specify the mode explicitly.

Code relying on Spring 1.2.x behavior may now break with org.springframework.beans.factory.BeanDefinitionStoreException. This class is called in to remedy this and should be used instead of, e.g. org.springframework.core.io.InputStreamResource.

The resource is fully stored in memory.

See Also:
Serialized Form

Constructor Summary
CachedResource(byte[] source)
           
CachedResource(byte[] source, String description)
           
CachedResource(String source, String encoding)
           
 
Method Summary
 String getDescription()
           
 InputStream getInputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedResource

public CachedResource(byte[] source)

CachedResource

public CachedResource(String source,
                      String encoding)
               throws UnsupportedEncodingException

CachedResource

public CachedResource(byte[] source,
                      String description)
Method Detail

getDescription

public String getDescription()

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.