|
Oracle® Fusion Middleware Remote Intradoc Client (RIDC) Java API Reference 11g Release 1 (11.1.1) E17274-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.stellent.ridc.model.serialize.HdaBinderSerializer
public class HdaBinderSerializer
Serializes a databinder to HDA format
Field Summary | |
---|---|
static java.lang.String[] |
DATA_TYPES Internally used data types that are supported in the HDA format that the databinder writes to, and reads from. |
Constructor Summary | |
---|---|
HdaBinderSerializer(java.lang.String encoding, DataFactory dataFactory) |
Method Summary | |
---|---|
protected byte[] |
getBytes(java.lang.String str) Utility function to obtain a byte stream based on the encoding set, or to the default system encoding if no encoding is set. |
DataFactory |
getDataFactory() |
java.lang.String |
getEncoding() Obtain the file encoding for the files referenced in this object. |
protected int |
getFieldType(java.lang.String fieldData) Parse and get the numerical value of the field type given a string. |
protected int |
getTypeIndex(DataResultSet.Field.Type type) This returns the index (or the numerical value) of the type. |
protected void |
packageOptionList(java.io.Writer writer, java.util.List<java.lang.String> options, java.lang.String name) Turns the option list into a hda formatted string, and writes the data to the writer. |
protected void |
packageProperties(java.io.Writer writer, DataObject dataObject, java.lang.String name) Turns the properties object into a hda formatted string, and writes the data to the writer. |
protected void |
packageResultSet(java.io.Writer writer, DataResultSet aSet, java.lang.String name) Turns the result set into a hda formatted string, and writes the data to the writer. |
DataBinder |
parseBinder(java.io.InputStream inputStream) Parses a BufferedReader object, and loads up the data into a new DataBinder object |
DataBinder |
parseBinder(java.io.Reader inputReader) Parses a BufferedReader object, and loads up the data into a new DataBinder object |
protected boolean |
parseNameValue(DataObject dataObject, java.lang.String envPair, java.lang.String delimiter) Split a name-value pair separated by a delimiter into its parts, and place the value in the local data |
protected void |
parseOptionList(DataBinder dataBinder, java.lang.String name, java.io.BufferedReader reader) Parse the buffered reader, and create a new option list with the data contained in it, until the @end line is reached. |
protected boolean |
parseProperties(DataBinder dataBinder, java.lang.String name, java.io.BufferedReader reader) Parse hda formatted properties, and merge the values into the local data if those values are not from the environment. |
protected void |
parseResultSet(DataBinder dataBinder, java.lang.String rName, java.io.BufferedReader reader) Parses the LWDataBinder object for the result set with a certain name |
protected java.lang.String |
readLine(java.io.BufferedReader reader, boolean suppress) Reads a line from a reader, and throws an exception if it cannot, unless 'suppress' is set to true. |
protected boolean |
readProperties(java.io.BufferedReader reader, DataObject props, java.lang.String endMark, boolean isJava) Read properties values in from a buffered reader and into a properties object. |
protected java.util.List<DataResultSet.Field> |
readResultSetHeader(java.io.BufferedReader bReader) Parses the column information for the result set from a character stream |
protected void |
readToEnd(java.io.BufferedReader reader) Advance the reader until the '@end' value is found on a line. |
void |
serializeBinder(java.io.OutputStream outputStream, DataBinder dataBinder) Writes out the local data, option lists, and result sets in hda format. |
void |
serializeBinder(java.io.Writer writer, DataBinder dataBinder) Writes out the local data, option lists, and result sets in hda format. |
void |
setEncoding(java.lang.String encoding) Set the encoding for the files referenced in this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] DATA_TYPES
Constructor Detail |
---|
public HdaBinderSerializer(java.lang.String encoding, DataFactory dataFactory)
Method Detail |
---|
public DataFactory getDataFactory()
public DataBinder parseBinder(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the binder input streamjava.io.IOException
public DataBinder parseBinder(java.io.Reader inputReader) throws java.io.IOException
inputReader
- the reader containing the binder charactersjava.io.IOException
public void serializeBinder(java.io.OutputStream outputStream, DataBinder dataBinder) throws java.io.IOException
outputStream
- the stream to write the binderdataBinder
- the data binder to serializejava.io.IOException
- if an exception occurs during serializationpublic void serializeBinder(java.io.Writer writer, DataBinder dataBinder) throws java.io.IOException
writer
- the writer to send the binderdataBinder
- the data binder to serializejava.io.IOException
- if an exception occurs during serializationprotected boolean parseProperties(DataBinder dataBinder, java.lang.String name, java.io.BufferedReader reader) throws java.io.IOException
dataBinder
- the data bindername
- the properties namereader
- the input readerjava.io.IOException
protected boolean readProperties(java.io.BufferedReader reader, DataObject props, java.lang.String endMark, boolean isJava) throws java.io.IOException
reader
- the input readerprops
- the data object to send the propertiesendMark
- the end mark to look forisJava
- true if this is a java-based requestjava.io.IOException
protected boolean parseNameValue(DataObject dataObject, java.lang.String envPair, java.lang.String delimiter)
dataObject
- the dataObject to store the resultenvPair
- the encoded name/value pairdelimiter
- the delimiting character in the envPairprotected void readToEnd(java.io.BufferedReader reader) throws java.io.IOException
reader
- the input readerjava.io.IOException
protected void parseOptionList(DataBinder dataBinder, java.lang.String name, java.io.BufferedReader reader) throws java.io.IOException
java.io.IOException
protected java.lang.String readLine(java.io.BufferedReader reader, boolean suppress) throws java.io.IOException
java.io.IOException
protected void parseResultSet(DataBinder dataBinder, java.lang.String rName, java.io.BufferedReader reader) throws java.io.IOException
rName
- The name of the result setreader
- A character stream to be parsed to find the result setjava.io.IOException
protected java.util.List<DataResultSet.Field> readResultSetHeader(java.io.BufferedReader bReader) throws java.io.IOException
bReader
- Character stream containing the result set informationjava.io.IOException
protected int getTypeIndex(DataResultSet.Field.Type type)
type
- the field typeprotected int getFieldType(java.lang.String fieldData)
fieldData
-protected void packageProperties(java.io.Writer writer, DataObject dataObject, java.lang.String name) throws java.io.IOException
java.io.IOException
protected void packageResultSet(java.io.Writer writer, DataResultSet aSet, java.lang.String name) throws java.io.IOException
java.io.IOException
protected void packageOptionList(java.io.Writer writer, java.util.List<java.lang.String> options, java.lang.String name) throws java.io.IOException
java.io.IOException
protected byte[] getBytes(java.lang.String str) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
|
Oracle® Fusion Middleware Remote Intradoc Client (RIDC) Java API Reference 11g Release 1 (11.1.1) E17274-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |