/** * Overriding the decodePrimitive() method of the parent class * to take care of binary values. */ protected Object decodePrimitive () throws BeanCoderException { final Class primitiveClass = currentClass(); if (primitiveClass != byte[].class) return super.decodePrimitive(); return decodeByteArray(); }
public Object decode () throws BeanCoderException { final int type = currentType(); //if (log.isDebugEnabled()) // log.debug("decode() type is "+type); if (type == T_NULL) return null; if (type == T_ARRAY) return decodeArray(); if (type == T_BYTE_ARRAY) return decodeByteArray(); if (type == T_MAP) return decodeMap(); if (type == T_COLLECTION) return decodeCollection(); if (type == T_PRIMITIVE) return decodePrimitive(); // else... return decodeBean(); }