org.springframework.extensions.surf.resource
Class ResourceJSONContentImpl

java.lang.Object
  extended by org.springframework.extensions.surf.resource.ResourceContentImpl
      extended by org.springframework.extensions.surf.resource.ResourceJSONContentImpl
All Implemented Interfaces:
ResourceContent, ResourceJSONContent

public class ResourceJSONContentImpl
extends ResourceContentImpl
implements ResourceJSONContent

JSON resource content implementation

Author:
muzquiano

Field Summary
protected  org.json.JSONObject jsonObject
           
 
Fields inherited from class org.springframework.extensions.surf.resource.ResourceContentImpl
bytes, id, logger, resource, timestamp, url
 
Constructor Summary
ResourceJSONContentImpl(Resource resource, String url)
           
 
Method Summary
 org.json.JSONObject getJSON()
          Gets the JSON.
 String getJSONString()
          Gets the JSON string.
 
Methods inherited from class org.springframework.extensions.surf.resource.ResourceContentImpl
getBytes, getInputStream, getReader, getResource, getTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.extensions.surf.resource.ResourceContent
getBytes, getInputStream, getReader, getResource, getTimestamp
 

Field Detail

jsonObject

protected org.json.JSONObject jsonObject
Constructor Detail

ResourceJSONContentImpl

public ResourceJSONContentImpl(Resource resource,
                               String url)
Method Detail

getJSONString

public String getJSONString()
                     throws IOException
Description copied from interface: ResourceJSONContent
Gets the JSON string.

Specified by:
getJSONString in interface ResourceJSONContent
Returns:
the JSON string
Throws:
IOException

getJSON

public org.json.JSONObject getJSON()
                            throws org.json.JSONException,
                                   IOException
Description copied from interface: ResourceJSONContent
Gets the JSON.

Specified by:
getJSON in interface ResourceJSONContent
Returns:
the JSON
Throws:
org.json.JSONException
IOException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.