org.jasig.springframework.core.io
Class DelegatingResource

java.lang.Object
  extended by org.jasig.springframework.core.io.DelegatingResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class DelegatingResource
extends Object
implements org.springframework.core.io.Resource

Wraps another Resource, delegates all calls to the the wrapped resource.

Version:
$Revision: 1.1 $
Author:
Eric Dalquist

Field Summary
protected  org.springframework.core.io.Resource resource
           
 
Constructor Summary
DelegatingResource(org.springframework.core.io.Resource resource)
           
 
Method Summary
 long contentLength()
           
 org.springframework.core.io.Resource createRelative(String relativePath)
           
 boolean equals(Object obj)
           
 boolean exists()
           
 String getDescription()
           
 File getFile()
           
 String getFilename()
           
 InputStream getInputStream()
           
 URI getURI()
           
 URL getURL()
           
 int hashCode()
           
 boolean isOpen()
           
 boolean isReadable()
           
 long lastModified()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

resource

protected final org.springframework.core.io.Resource resource
Constructor Detail

DelegatingResource

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

exists

public boolean exists()
Specified by:
exists in interface org.springframework.core.io.Resource

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface org.springframework.core.io.InputStreamSource
Throws:
IOException

isReadable

public boolean isReadable()
Specified by:
isReadable in interface org.springframework.core.io.Resource

isOpen

public boolean isOpen()
Specified by:
isOpen in interface org.springframework.core.io.Resource

getURL

public URL getURL()
           throws IOException
Specified by:
getURL in interface org.springframework.core.io.Resource
Throws:
IOException

getURI

public URI getURI()
           throws IOException
Specified by:
getURI in interface org.springframework.core.io.Resource
Throws:
IOException

getFile

public File getFile()
             throws IOException
Specified by:
getFile in interface org.springframework.core.io.Resource
Throws:
IOException

lastModified

public long lastModified()
                  throws IOException
Specified by:
lastModified in interface org.springframework.core.io.Resource
Throws:
IOException

createRelative

public org.springframework.core.io.Resource createRelative(String relativePath)
                                                    throws IOException
Specified by:
createRelative in interface org.springframework.core.io.Resource
Throws:
IOException

getFilename

public String getFilename()
Specified by:
getFilename in interface org.springframework.core.io.Resource

getDescription

public String getDescription()
Specified by:
getDescription in interface org.springframework.core.io.Resource

contentLength

public long contentLength()
                   throws IOException
Specified by:
contentLength in interface org.springframework.core.io.Resource
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Jasig. All Rights Reserved.