|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectspark.data.io.SONReader
public class SONReader
This is a concrete implementation of SparkReader that will read text sources in SON formation. SON format is just like JSON except that a class name can precede objects such as "Point{ x:17, y:45 }". The translation between the class name and the actual Java class to be created is determined by the TypeFactory that is used with the reader.
| Constructor Summary | |
|---|---|
SONReader()
This creates a new SONReader. |
|
SONReader(java.lang.String input)
This creates a new SONReader. |
|
SONReader(java.lang.String[] typePackageList)
This creates a new SONReader. |
|
SONReader(java.lang.String[] typePackageList,
java.io.InputStream input)
This creates a new SONReader. |
|
SONReader(java.lang.String[] typePackageList,
java.lang.String input)
This creates a new SONReader. |
|
| Method Summary | |
|---|---|
TypeFactory |
getTypeFactory()
This will return the TypeFactory being used. |
SV |
read()
This is the heart of the reader. |
void |
setSource(java.io.InputStream source)
This will set the source from which objects are to be read. |
void |
setSource(java.lang.String source)
This will set a string from which objects can be read. |
void |
setTypeFactory(TypeFactory factory)
This will set the TypeFactory to be used in constructing objects based on what is read from the external form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SONReader()
public SONReader(java.lang.String[] typePackageList)
typePackageList - this is the restricted list
of packages from which objects can be created. See TypeFactoryReflect for
complete documentation on the package list.
public SONReader(java.lang.String[] typePackageList,
java.io.InputStream input)
typePackageList - this is the restricted list
of packages from which objects can be written. See TypeFactoryReflect for
complete documentation on the package list.input - this is the input stream from which the SON is to
be read.public SONReader(java.lang.String input)
input - a string from which the SON object is to be read.
public SONReader(java.lang.String[] typePackageList,
java.lang.String input)
typePackageList - this is the restricted list
of packages from which objects can be written. See TypeFactoryReflect for
complete documentation on the package list.input - this is the string from which SON objects are read.| Method Detail |
|---|
public void setTypeFactory(TypeFactory factory)
SparkReader
setTypeFactory in interface SparkReaderfactory - the factory to be used in translating type names into objectspublic TypeFactory getTypeFactory()
SparkReader
getTypeFactory in interface SparkReaderpublic void setSource(java.io.InputStream source)
SparkReader
setSource in interface SparkReadersource - an input stream from which to read objects.public void setSource(java.lang.String source)
SparkReader
setSource in interface SparkReadersource - the source string from which objects can be readpublic SV read()
SparkReader
read in interface SparkReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||