public abstract class HdaSerializerUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HdaSerializerUtils.FormatType
The format type of the stream
|
| Modifier and Type | Field and Description |
|---|---|
static String |
BEGIN_HDA |
static String |
BEGIN_HDA_NO_HEADER |
| Constructor and Description |
|---|
HdaSerializerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(String in)
Decodes a string with backslash escaped characters, "\\n" goes to "\n"
|
static HdaSerializerUtils.FormatType |
determineFormat(InputStream inputStream, String encoding)
Determines the format by looking at the first bytes of the stream and checkin it against the
BEGIN_HDA string for equality. |
static String |
encode(String in)
Encodes a string to have backslash escape characters, "\n" goes to "\\n"
|
static long |
readIdcContentLength(InputStream inputStream)
Read the custom IDCFILE content length portion of the inputstream
|
public static final String BEGIN_HDA
public static final String BEGIN_HDA_NO_HEADER
public static String decode(String in)
in - the string to encodepublic static String encode(String in)
in - the encoded stringpublic static HdaSerializerUtils.FormatType determineFormat(InputStream inputStream, String encoding) throws IOException
BEGIN_HDA string for equality. Assumes all headers have been readinputStream - the current input streamencoding - the stream encodingHdaSerializerUtils.FormatType.HDA_TYPE or HdaSerializerUtils.FormatType.STREAM_TYPEIOExceptionpublic static long readIdcContentLength(InputStream inputStream) throws IOException
inputStream -IOException