org.apache.metamodel.spring
Class SpringResource

java.lang.Object
  extended by 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)
           
 
Method Summary
 void append(Action<OutputStream> arg0)
           
 long getLastModified()
           
 String getName()
           
 String getQualifiedPath()
           
 org.springframework.core.io.Resource getResource()
          Gets the underlying spring Resource object.
 long getSize()
           
 boolean isExists()
           
 boolean isReadOnly()
           
 InputStream read()
           
 void read(Action<InputStream> action)
           
<E> E
read(Func<InputStream,E> func)
           
 void write(Action<OutputStream> arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringResource

public SpringResource(org.springframework.core.io.Resource resource)
Method Detail

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.