org.springframework.extensions.surf.resource
Interface ResourceContent

All Known Subinterfaces:
ResourceJSONContent, ResourceXMLContent
All Known Implementing Classes:
ResourceContentImpl, ResourceJSONContentImpl, ResourceXMLContentImpl

public interface ResourceContent

Interface to describe content around a Resource.

Author:
muzquiano

Method Summary
 byte[] getBytes()
          Gets the bytes.
 InputStream getInputStream()
          Retrieves an input stream to the resource content
 Reader getReader()
          Gets the reader for the resource content
 Resource getResource()
          A link back to the resource of which this content is a part
 long getTimestamp()
          Returns the timestamp when this content convenience instance was created
 

Method Detail

getResource

Resource getResource()
A link back to the resource of which this content is a part

Returns:

getTimestamp

long getTimestamp()
Returns the timestamp when this content convenience instance was created

Returns:

getBytes

byte[] getBytes()
                throws IOException
Gets the bytes.

Returns:
the bytes
Throws:
IOException

getInputStream

InputStream getInputStream()
                           throws IOException
Retrieves an input stream to the resource content

Returns:
the input stream
Throws:
IOException - Signals that an I/O exception has occurred.

getReader

Reader getReader()
                 throws IOException
Gets the reader for the resource content

Returns:
the reader
Throws:
IOException - Signals that an I/O exception has occurred.


Copyright © 2009 SpringSource, Inc. All Rights Reserved.