ccc.plugins.s11n.json
Class FileSerializer

java.lang.Object
  extended by ccc.plugins.s11n.json.ResSerializer<T>
      extended by ccc.plugins.s11n.json.ResourceSerializer<File>
          extended by ccc.plugins.s11n.json.FileSerializer
All Implemented Interfaces:
Serializer<File>

public class FileSerializer
extends ResourceSerializer<File>

Serializer for Folders.

Author:
Civic Computing Ltd.

Constructor Summary
FileSerializer()
           
 
Method Summary
protected  File createObject()
          Create a new instance of type T.
 File read(Json json)
          Deserialize from a representation.
 Json write(Json json, File instance)
          Serialize to representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSerializer

public FileSerializer()
Method Detail

read

public File read(Json json)
Deserialize from a representation.

Specified by:
read in interface Serializer<File>
Overrides:
read in class ResourceSerializer<File>
Parameters:
json - The wire representation.
Returns:
The corresponding object.

createObject

protected File createObject()
Create a new instance of type T.

Specified by:
createObject in class ResSerializer<File>
Returns:
The newly created instance of T.

write

public Json write(Json json,
                  File instance)
Serialize to representation.

Specified by:
write in interface Serializer<File>
Overrides:
write in class ResourceSerializer<File>
Parameters:
json - The wire representation.
instance - The object to serialize.
Returns:
Returns the 'json' input param if the 'instance' param is not NULL; returns NULL otherwise.


Copyright © 2010. All Rights Reserved.