|
IBM Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.format.AbstractFormatElement
com.ibm.btt.format.BaseDecorator
com.ibm.btt.format.impl.JSONDecorator
public class JSONDecorator
Field Summary |
---|
Fields inherited from class com.ibm.btt.format.AbstractFormatElement |
---|
dataName, tagName, TOSTRINGS_MARGIN |
Constructor Summary | |
---|---|
JSONDecorator()
|
Method Summary | |
---|---|
protected Message |
addDecoration(Message message)
|
static Message |
escape(Message msg,
java.lang.String encoding)
" => \" , \ => \\ |
Message[] |
extract(Message message)
Extracts (strips) the subMessage corresponding to the FormatElement from the input Message and returns it and the remaining Message as the elements of an array. |
Message |
format(IndexedFormat format,
ReadAdapter dataAdapter)
|
Message |
format(ReadAdapter dataWrapper)
This method is attended to be called by client code of FormatElement |
protected static byte[] |
getBytes(java.lang.String str,
java.lang.String encoding)
|
protected static Message |
getPostTag(boolean hasDataName,
boolean isContainer,
boolean isArray)
Returns the tag that follows each DataElement. |
protected static int |
getPostTagEndIndex(Message message,
boolean hasDataName,
boolean isContainer,
boolean isArray)
|
protected static Message |
getPreTag(boolean hasDataName,
boolean isContainer,
boolean isArray,
java.lang.String dataName)
Returns the tag that preceeds each DataElement. |
protected static int |
getPreTagEndIndex(Message message,
boolean hasDataName,
boolean isContainer,
boolean isArray,
java.lang.String dataName)
Returns the tag that preceeds each DataElement. |
protected static java.lang.String |
getStr(byte[] bytes,
java.lang.String encoding)
|
protected Message |
removeDecoration(Message message)
|
static Message |
unescape(Message msg,
java.lang.String encoding)
|
void |
unformat(IndexedFormat fmt,
Message bytes,
WriteAdapter dataAdapter)
|
void |
unformat(Message message,
WriteAdapter dataAdapter)
This method is attended to be called by client code of FormatElement |
Methods inherited from class com.ibm.btt.format.BaseDecorator |
---|
attributes, getDataName, getDecorated, isContainer, rootDecorated, setDecorated, toStrings |
Methods inherited from class com.ibm.btt.format.AbstractFormatElement |
---|
setDataName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSONDecorator()
Method Detail |
---|
public Message[] extract(Message message) throws ExtractException
FormatElement
extract
in interface FormatElement
extract
in class BaseDecorator
ExtractException
protected Message addDecoration(Message message) throws FormatException
addDecoration
in class BaseDecorator
FormatException
public Message format(ReadAdapter dataWrapper) throws FormatException
FormatElement
format
in interface FormatElement
format
in class BaseDecorator
FormatException
public void unformat(Message message, WriteAdapter dataAdapter) throws UnformatException
FormatElement
unformat
in interface FormatElement
unformat
in class BaseDecorator
UnformatException
protected Message removeDecoration(Message message) throws UnformatException
removeDecoration
in class BaseDecorator
UnformatException
public Message format(IndexedFormat format, ReadAdapter dataAdapter) throws FormatException
FormatException
public void unformat(IndexedFormat fmt, Message bytes, WriteAdapter dataAdapter) throws UnformatException
UnformatException
protected static Message getPostTag(boolean hasDataName, boolean isContainer, boolean isArray)
aName
- java.lang.String
java.io.UnsupportedEncodingException
protected static Message getPreTag(boolean hasDataName, boolean isContainer, boolean isArray, java.lang.String dataName)
aName
- java.lang.String
java.io.UnsupportedEncodingException
protected static int getPreTagEndIndex(Message message, boolean hasDataName, boolean isContainer, boolean isArray, java.lang.String dataName)
aName
- java.lang.String
java.io.UnsupportedEncodingException
protected static int getPostTagEndIndex(Message message, boolean hasDataName, boolean isContainer, boolean isArray)
public static Message escape(Message msg, java.lang.String encoding) throws java.io.UnsupportedEncodingException
str
-
java.io.UnsupportedEncodingException
public static Message unescape(Message msg, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
protected static java.lang.String getStr(byte[] bytes, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
protected static byte[] getBytes(java.lang.String str, java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
|
IBM Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |