org.apache.metamodel.spring
Class SpringResource
java.lang.Object
org.apache.metamodel.spring.SpringResource
- All Implemented Interfaces:
- HasName, Resource
public class SpringResource
- extends Object
- implements Resource
A Resource implementation based on spring's similar
Resource concept.
|
Constructor Summary |
SpringResource(org.springframework.core.io.Resource resource)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringResource
public SpringResource(org.springframework.core.io.Resource resource)
append
public void append(Action<OutputStream> arg0)
throws ResourceException
- Specified by:
append in interface Resource
- Throws:
ResourceException
getLastModified
public long getLastModified()
- Specified by:
getLastModified in interface Resource
getName
public String getName()
- Specified by:
getName in interface HasName- Specified by:
getName in interface Resource
getQualifiedPath
public String getQualifiedPath()
- Specified by:
getQualifiedPath in interface Resource
getSize
public long getSize()
- Specified by:
getSize in interface Resource
isExists
public boolean isExists()
- Specified by:
isExists in interface Resource
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly in interface Resource
read
public InputStream read()
throws ResourceException
- Specified by:
read in interface Resource
- Throws:
ResourceException
read
public void read(Action<InputStream> action)
throws ResourceException
- Specified by:
read in interface Resource
- Throws:
ResourceException
read
public <E> E read(Func<InputStream,E> func)
throws ResourceException
- Specified by:
read in interface Resource
- Throws:
ResourceException
write
public void write(Action<OutputStream> arg0)
throws ResourceException
- Specified by:
write in interface Resource
- Throws:
ResourceException
getResource
public org.springframework.core.io.Resource getResource()
- Gets the underlying spring
Resource
object.
- Returns:
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.