data.setGetIndex(buffer.getIndex());
data.setPutIndex(data.getIndex() + dataLength);
buffer.setGetIndex(buffer.getIndex() + (dataLength + 3 & -4));
Type type = Dictionary.getInstance().getType(vendorId, code);
if (type == null)
type = Factory.newType("Unknown", vendorId, code, Common.__octetString);
AVP avp = new AVP(type);
// TODO flags
avp.setValue(type.getDataFormat().decode(data));
return avp;
}