org.springframework.data.repository.init

## Class UnmarshallingResourceReader

- java.lang.Object
- - org.springframework.data.repository.init.UnmarshallingResourceReader

All Implemented Interfaces:
  ResourceReader

    public class UnmarshallingResourceReader
    extends Object
    implements ResourceReader

Author:
  Oliver Gierke, Christoph Strobl

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.springframework.data.repository.init.ResourceReader

`ResourceReader.Type`

### Constructor Summary

Constructors
Constructor and Description
`UnmarshallingResourceReader(Unmarshaller unmarshaller)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `readFrom(Resource resource, ClassLoader classLoader)` Reads a single or `Collection` of target objects from the given `Resource`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### UnmarshallingResourceReader

    public UnmarshallingResourceReader(Unmarshaller unmarshaller)

Parameters:
  `unmarshaller` -

### Method Detail

#### readFrom

    public Object readFrom(Resource resource,
                           @Nullable
                           ClassLoader classLoader)
                    throws IOException

Description copied from interface: `ResourceReader`
Reads a single or `Collection` of target objects from the given `Resource`.

Specified by:
  `readFrom` in interface `ResourceReader`
Parameters:
  `resource` - must not be null.
  `classLoader` - can be null.
Returns:
  `Collection` of target objects if resource contains multiple ones of single on. Never null.
Throws:
  `IOException`