Class HdaSerializerUtils
java.lang.Object
oracle.stellent.ridc.model.serialize.HdaSerializerUtils
Utility methods used when serializing binders in HDA protocol.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe format type of the stream -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDecodes a string with backslash escaped characters, "\\n" goes to "\n"determineFormat(InputStream inputStream, String encoding) Determines the format by looking at the first bytes of the stream and checkin it against theBEGIN_HDAstring for equality.static StringEncodes a string to have backslash escape characters, "\n" goes to "\\n"static longreadIdcContentLength(InputStream inputStream) Read the custom IDCFILE content length portion of the inputstream
-
Field Details
-
BEGIN_HDA
- See Also:
-
BEGIN_HDA_NO_HEADER
- See Also:
-
-
Constructor Details
-
HdaSerializerUtils
public HdaSerializerUtils()
-
-
Method Details
-
decode
Decodes a string with backslash escaped characters, "\\n" goes to "\n"- Parameters:
in- the string to encode- Returns:
- the encoded string
-
encode
Encodes a string to have backslash escape characters, "\n" goes to "\\n"- Parameters:
in- the encoded string- Returns:
- the decoded string
-
determineFormat
public static HdaSerializerUtils.FormatType determineFormat(InputStream inputStream, String encoding) throws IOException Determines the format by looking at the first bytes of the stream and checkin it against theBEGIN_HDAstring for equality. Assumes all headers have been read- Parameters:
inputStream- the current input streamencoding- the stream encoding- Returns:
- the format type, either
HdaSerializerUtils.FormatType.HDA_TYPEorHdaSerializerUtils.FormatType.STREAM_TYPE - Throws:
IOException
-
readIdcContentLength
Read the custom IDCFILE content length portion of the inputstream- Parameters:
inputStream-- Returns:
- Throws:
IOException
-