in client/src/main/java/org/apache/qpid/transport/codec/AbstractDecoder.java [375:454]
private Object read(Type t)
{
switch (t)
{
case BIN8:
case UINT8:
return readUint8();
case INT8:
return get();
case CHAR:
return (char) get();
case BOOLEAN:
return get() > 0;
case BIN16:
case UINT16:
return readUint16();
case INT16:
return (short) readUint16();
case BIN32:
case UINT32:
return readUint32();
case CHAR_UTF32:
case INT32:
return (int) readUint32();
case FLOAT:
return Float.intBitsToFloat((int) readUint32());
case BIN64:
case UINT64:
case INT64:
case DATETIME:
return readUint64();
case DOUBLE:
return Double.longBitsToDouble(readUint64());
case UUID:
return readUuid();
case STR8:
return readStr8();
case STR16:
return readStr16();
case STR8_LATIN:
case STR8_UTF16:
case STR16_LATIN:
case STR16_UTF16:
// XXX: need to do character conversion
return new String(readBytes(t));
case MAP:
return readMap();
case LIST:
return readList();
case ARRAY:
return readArray();
case STRUCT32:
return readStruct32();
case BIN40:
case DEC32:
case BIN72:
case DEC64:
// XXX: what types are we supposed to use here?
return readBytes(t);
case VOID:
return null;
default:
return readBytes(t);
}
}