org.geotools.data.pickle
Class FeaturePickler

java.lang.Object
  extended byorg.geotools.data.pickle.FeaturePickler
All Implemented Interfaces:
java.io.Serializable

public class FeaturePickler
extends java.lang.Object
implements java.io.Serializable

FeaturePickler provides a mechanism for Feature implementation independant means of storage.
For each FeatureType encountered while writing a FeatureCollection, there is a corresponding FeaturePickler. The job of the pickler is twofold:

 1) Store the FeatureType
 2) Read a Feature from the ObjectStream
 

Author:
IanSchneider
See Also:
Serialized Form

Constructor Summary
FeaturePickler(FeatureType schema, short handle)
          Creates a new instance of FeaturePickler
 
Method Summary
 FeatureType getSchema()
           
 java.lang.Object[] readAttributes(java.io.ObjectInputStream input)
           
 Feature readFeature(java.io.ObjectInputStream input)
           
 void writeFeature(Feature f, java.io.ObjectOutputStream output, java.util.Set clazzes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeaturePickler

public FeaturePickler(FeatureType schema,
                      short handle)
Creates a new instance of FeaturePickler

Method Detail

getSchema

public FeatureType getSchema()

writeFeature

public void writeFeature(Feature f,
                         java.io.ObjectOutputStream output,
                         java.util.Set clazzes)
                  throws java.io.IOException
Throws:
java.io.IOException

readAttributes

public java.lang.Object[] readAttributes(java.io.ObjectInputStream input)
                                  throws java.io.IOException,
                                         java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

readFeature

public Feature readFeature(java.io.ObjectInputStream input)
                    throws java.io.IOException,
                           java.lang.ClassNotFoundException,
                           IllegalAttributeException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
IllegalAttributeException


Copyright © GeoTools. All Rights Reserved.