|
Oracle® Fusion Middleware Java API Reference for Oracle WebCenter Content Remote Intradoc Client (RIDC) 11g Release 1 (11.1) E17274-04 |
|||||||||
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 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(String encoding, DataFactory dataFactory) |
Method Summary | |
---|---|
protected byte[] |
getBytes(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() |
String |
getEncoding() Obtain the file encoding for the files referenced in this object. |
protected int |
getFieldType(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(Writer writer, List<String> options, String name) Turns the option list into a hda formatted string, and writes the data to the writer. |
protected void |
packageProperties(Writer writer, DataObject dataObject, String name) Turns the properties object into a hda formatted string, and writes the data to the writer. |
protected void |
packageResultSet(Writer writer, DataResultSet aSet, String name) Turns the result set into a hda formatted string, and writes the data to the writer. |
DataBinder |
parseBinder(InputStream inputStream) Parses a BufferedReader object, and loads up the data into a new DataBinder object |
DataBinder |
parseBinder(Reader inputReader) Parses a BufferedReader object, and loads up the data into a new DataBinder object |
protected boolean |
parseNameValue(DataObject dataObject, String envPair, 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, String name, 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, String name, 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, String rName, BufferedReader reader) Parses the LWDataBinder object for the result set with a certain name |
protected String |
readLine(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(BufferedReader reader, DataObject props, String endMark, boolean isJava) Read properties values in from a buffered reader and into a properties object. |
protected List<DataResultSet.Field> |
readResultSetHeader(BufferedReader bReader) Parses the column information for the result set from a character stream |
protected void |
readToEnd(BufferedReader reader) Advance the reader until the '@end' value is found on a line. |
void |
serializeBinder(OutputStream outputStream, DataBinder dataBinder) Writes out the local data, option lists, and result sets in hda format. |
void |
serializeBinder(Writer writer, DataBinder dataBinder) Writes out the local data, option lists, and result sets in hda format. |
void |
setEncoding(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 String[] DATA_TYPES
Constructor Detail |
---|
public HdaBinderSerializer(String encoding, DataFactory dataFactory)
Method Detail |
---|
public DataFactory getDataFactory()
public DataBinder parseBinder(InputStream inputStream) throws IOException
inputStream
- the binder input streamIOException
public DataBinder parseBinder(Reader inputReader) throws IOException
inputReader
- the reader containing the binder charactersIOException
public void serializeBinder(OutputStream outputStream, DataBinder dataBinder) throws IOException
outputStream
- the stream to write the binderdataBinder
- the data binder to serializeIOException
- if an exception occurs during serializationpublic void serializeBinder(Writer writer, DataBinder dataBinder) throws IOException
writer
- the writer to send the binderdataBinder
- the data binder to serializeIOException
- if an exception occurs during serializationprotected boolean parseProperties(DataBinder dataBinder, String name, BufferedReader reader) throws IOException
dataBinder
- the data bindername
- the properties namereader
- the input readerIOException
protected boolean readProperties(BufferedReader reader, DataObject props, String endMark, boolean isJava) throws 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 requestIOException
protected boolean parseNameValue(DataObject dataObject, String envPair, String delimiter)
dataObject
- the dataObject to store the resultenvPair
- the encoded name/value pairdelimiter
- the delimiting character in the envPairprotected void readToEnd(BufferedReader reader) throws IOException
reader
- the input readerIOException
protected void parseOptionList(DataBinder dataBinder, String name, BufferedReader reader) throws IOException
IOException
protected String readLine(BufferedReader reader, boolean suppress) throws IOException
IOException
protected void parseResultSet(DataBinder dataBinder, String rName, BufferedReader reader) throws IOException
rName
- The name of the result setreader
- A character stream to be parsed to find the result setIOException
protected List<DataResultSet.Field> readResultSetHeader(BufferedReader bReader) throws IOException
bReader
- Character stream containing the result set informationIOException
protected int getTypeIndex(DataResultSet.Field.Type type)
type
- the field typeprotected int getFieldType(String fieldData)
fieldData
-protected void packageProperties(Writer writer, DataObject dataObject, String name) throws IOException
IOException
protected void packageResultSet(Writer writer, DataResultSet aSet, String name) throws IOException
IOException
protected void packageOptionList(Writer writer, List<String> options, String name) throws IOException
IOException
protected byte[] getBytes(String str) throws UnsupportedEncodingException
UnsupportedEncodingException
public String getEncoding()
public void setEncoding(String encoding)
|
Oracle® Fusion Middleware Java API Reference for Oracle WebCenter Content Remote Intradoc Client (RIDC) 11g Release 1 (11.1) E17274-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |