T - public interface Data<T>
It stores either Object (defined by Generic <T>) or String.
On asking for Object of type <T>, it will respond with the object if it exists, or unmarshal the string and pass the result back.
On asking for String, it will respond with the String if it exists, or marshal the String and pass the result back.
the "options" available on several functions control the output of this particular call. When blank, they will default to the DataFactory defaults. When present, they override this particular call. The available options are "pretty" (for XML and JSON) and "fragment" (XML only concept), which drops the "" header so you can create larger XML documents from the output.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Data.TYPE |
| Modifier and Type | Method and Description |
|---|---|
T |
asObject()
Respond with the Object of type <T> if it exists, or unmarshal from String
and pass the result back.
|
String |
asString()
Respond with the String if it exists, or marshal the String and pass the result back.
|
void |
direct(InputStream input,
OutputStream output) |
Class<T> |
getTypeClass()
Return the Class Type supported by this DataObject
|
Data<T> |
in(Data.TYPE type) |
Data<T> |
load(InputStream is) |
Data<T> |
load(Reader rdr) |
Data<T> |
load(String str) |
Data<T> |
load(T t) |
Data<T> |
option(int option)
Set a particular option on an existing Out
if int is negative, it should remove the option
|
Data<T> |
out(Data.TYPE type) |
Data<T> |
to(OutputStream os) |
Data<T> |
to(Writer writer) |
static final int PRETTY
static final int FRAGMENT
String asString() throws APIException
APIExceptionT asObject() throws APIException
However, use the Env the Data Object was created with.
APIExceptionData<T> option(int option)
option - Data<T> to(OutputStream os) throws APIException, IOException
APIExceptionIOExceptionData<T> to(Writer writer) throws APIException, IOException
APIExceptionIOExceptionData<T> load(T t) throws APIException
APIExceptionData<T> load(String str) throws APIException
APIExceptionData<T> load(InputStream is) throws APIException
APIExceptionData<T> load(Reader rdr) throws APIException
APIExceptionClass<T> getTypeClass()
void direct(InputStream input, OutputStream output) throws APIException, IOException
APIExceptionIOExceptionCopyright © 2017. All rights reserved.