org.mule.config.spring.util
Class CachedResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.mule.config.spring.util.CachedResource
- All Implemented Interfaces:
- org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource
public class CachedResource
- extends org.springframework.core.io.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
BeanDefinitionStoreException. This
class is called in to remedy this and should be used instead of, e.g.
InputStreamResource. The resource is
fully stored in memory.
| Methods inherited from class org.springframework.core.io.AbstractResource |
createRelative, equals, exists, getFile, getFileForLastModifiedCheck, getFilename, getURI, getURL, hashCode, isOpen, isReadable, lastModified, toString |
CachedResource
public CachedResource(byte[] source)
CachedResource
public CachedResource(String source,
String encoding)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
CachedResource
public CachedResource(byte[] source,
String description)
CachedResource
public CachedResource(Reader reader,
String encoding)
throws IOException
- Throws:
IOException
getDescription
public String getDescription()
getInputStream
public InputStream getInputStream()
throws IOException
- Throws:
IOException
Copyright © 2003-2011 MuleSoft, Inc.. All Rights Reserved.