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

## 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.

Constructor Summary
`CachedResource(byte[] source)`
`CachedResource(byte[] source, String description)`
`CachedResource(Reader reader, String encoding)`
`CachedResource(String source, String encoding)`

Method Summary
`String` | `getDescription()`
`InputStream` | `getInputStream()`

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`

Constructor Detail

### 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`

Method Detail

### getDescription

    public String getDescription()

  Specified by:
    `getDescription` in interface `org.springframework.core.io.Resource`
  Specified by:
    `getDescription` in class `org.springframework.core.io.AbstractResource`

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Throws:
    `IOException`

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

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.