class SPPDecoder implements MALDecoder {

	@Override
	public Attribute decodeAttribute() throws MALException {
		int shortForm = decodeUOctet().getValue() + 1;
		switch (shortForm) {
			case Attribute._BLOB_TYPE_SHORT_FORM:
				return decodeBlob();
			case Attribute._BOOLEAN_TYPE_SHORT_FORM:
				return new Union(decodeBoolean());
			case Attribute._DOUBLE_TYPE_SHORT_FORM:
				return new Union(decodeDouble());
			case Attribute._DURATION_TYPE_SHORT_FORM:
				return decodeDuration();
			case Attribute._FINETIME_TYPE_SHORT_FORM:
				return decodeFineTime();
			case Attribute._FLOAT_TYPE_SHORT_FORM:
				return new Union(decodeFloat());
			case Attribute._IDENTIFIER_TYPE_SHORT_FORM:
				return decodeIdentifier();
			case Attribute._INTEGER_TYPE_SHORT_FORM:
				return new Union(decodeInteger());
			case Attribute._LONG_TYPE_SHORT_FORM:
				return new Union(decodeLong());
			case Attribute._OCTET_TYPE_SHORT_FORM:
				return new Union(decodeOctet());
			case Attribute._SHORT_TYPE_SHORT_FORM:
				return new Union(decodeShort());
			case Attribute._STRING_TYPE_SHORT_FORM:
				return new Union(decodeString());
			case Attribute._TIME_TYPE_SHORT_FORM:
				return decodeTime();
			case Attribute._UINTEGER_TYPE_SHORT_FORM:
				return decodeUInteger();
			case Attribute._ULONG_TYPE_SHORT_FORM:
				return decodeULong();
			case Attribute._UOCTET_TYPE_SHORT_FORM:
				return decodeUOctet();
			case Attribute._URI_TYPE_SHORT_FORM:
				return decodeURI();
			case Attribute._USHORT_TYPE_SHORT_FORM:
				return decodeUShort();
			default:
				throw new MALException("Unknown attribute type short form: " + shortForm);
		}
	}

	public  SPPDecoder(final InputStream inputStream, final Map properties);

}