Package org.red5.io.object
Class DataTypes
- java.lang.Object
-
- org.red5.io.object.DataTypes
-
public class DataTypes extends Object
The core datatypes supported by red5, I have left out undefined (this is up for debate). If a codec returns one of these datatypes its handled by the base serializer.- Author:
- The Red5 Project, Luke Hubbard, Codegent Ltd (luke@codegent.com)
-
-
Field Summary
Fields Modifier and Type Field Description static byteCORE_ARRAYArray type markerstatic byteCORE_BOOLEANBoolean type markerstatic byteCORE_BYTEARRAYByteArray type marker (AMF3 only)static byteCORE_DATEDate type markerstatic byteCORE_END_OBJECTEnd markerstatic byteCORE_MAPMap type markerstatic byteCORE_NULLNull type markerstatic byteCORE_NUMBERNumber type markerstatic byteCORE_OBJECTObject (Hash) type markerstatic byteCORE_SKIPPadding markerstatic byteCORE_STRINGString type markerstatic byteCORE_SWITCHSwitch decoding markerstatic byteCORE_VECTOR_INTVector type markersstatic byteCORE_VECTOR_NUMBERstatic byteCORE_VECTOR_OBJECTstatic byteCORE_VECTOR_UINTstatic byteCORE_XMLXML type markerstatic byteCUSTOM_AMF_MASKCustom datatype AMF maskstatic byteCUSTOM_JSON_MASKCustom datatype JSON maskstatic byteCUSTOM_MOCK_MASKCustom datatype mock mask markerstatic byteCUSTOM_RTMP_MASKCustom datatype RTMP maskstatic byteCUSTOM_XML_MASKCustom datatype XML maskstatic byteOPT_REFERENCEReference type, this is optional for codecs to support
-
Constructor Summary
Constructors Constructor Description DataTypes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisBasicType(byte type)Returns whether it is a basic data typestatic booleanisComplexType(byte type)Returns whether it is a complex data typestatic booleanisCustomType(byte type)Returns whether it is a custom data typestatic StringtoStringValue(byte dataType)Returns the string value of the data type
-
-
-
Field Detail
-
CORE_END_OBJECT
public static final byte CORE_END_OBJECT
End marker- See Also:
- Constant Field Values
-
CORE_SWITCH
public static final byte CORE_SWITCH
Switch decoding marker- See Also:
- Constant Field Values
-
CORE_SKIP
public static final byte CORE_SKIP
Padding marker- See Also:
- Constant Field Values
-
CORE_NULL
public static final byte CORE_NULL
Null type marker- See Also:
- Constant Field Values
-
CORE_BOOLEAN
public static final byte CORE_BOOLEAN
Boolean type marker- See Also:
- Constant Field Values
-
CORE_NUMBER
public static final byte CORE_NUMBER
Number type marker- See Also:
- Constant Field Values
-
CORE_STRING
public static final byte CORE_STRING
String type marker- See Also:
- Constant Field Values
-
CORE_DATE
public static final byte CORE_DATE
Date type marker- See Also:
- Constant Field Values
-
CORE_ARRAY
public static final byte CORE_ARRAY
Array type marker- See Also:
- Constant Field Values
-
CORE_MAP
public static final byte CORE_MAP
Map type marker- See Also:
- Constant Field Values
-
CORE_XML
public static final byte CORE_XML
XML type marker- See Also:
- Constant Field Values
-
CORE_OBJECT
public static final byte CORE_OBJECT
Object (Hash) type marker- See Also:
- Constant Field Values
-
CORE_BYTEARRAY
public static final byte CORE_BYTEARRAY
ByteArray type marker (AMF3 only)- See Also:
- Constant Field Values
-
OPT_REFERENCE
public static final byte OPT_REFERENCE
Reference type, this is optional for codecs to support- See Also:
- Constant Field Values
-
CUSTOM_MOCK_MASK
public static final byte CUSTOM_MOCK_MASK
Custom datatype mock mask marker- See Also:
- Constant Field Values
-
CUSTOM_AMF_MASK
public static final byte CUSTOM_AMF_MASK
Custom datatype AMF mask- See Also:
- Constant Field Values
-
CUSTOM_RTMP_MASK
public static final byte CUSTOM_RTMP_MASK
Custom datatype RTMP mask- See Also:
- Constant Field Values
-
CUSTOM_JSON_MASK
public static final byte CUSTOM_JSON_MASK
Custom datatype JSON mask- See Also:
- Constant Field Values
-
CUSTOM_XML_MASK
public static final byte CUSTOM_XML_MASK
Custom datatype XML mask- See Also:
- Constant Field Values
-
CORE_VECTOR_INT
public static final byte CORE_VECTOR_INT
Vector type markers- See Also:
- Constant Field Values
-
CORE_VECTOR_UINT
public static final byte CORE_VECTOR_UINT
- See Also:
- Constant Field Values
-
CORE_VECTOR_NUMBER
public static final byte CORE_VECTOR_NUMBER
- See Also:
- Constant Field Values
-
CORE_VECTOR_OBJECT
public static final byte CORE_VECTOR_OBJECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
toStringValue
public static String toStringValue(byte dataType)
Returns the string value of the data type- Parameters:
dataType- AS data type as byte- Returns:
- String String value of given ActionScript data type
-
isBasicType
public static boolean isBasicType(byte type)
Returns whether it is a basic data type- Parameters:
type- Data type as byte- Returns:
- boolean
trueif data type is primitive,falseotherwise
-
isComplexType
public static boolean isComplexType(byte type)
Returns whether it is a complex data type- Parameters:
type- Data type as byte- Returns:
- boolean
trueif data type is complex (non-primitive),falseotherwise
-
isCustomType
public static boolean isCustomType(byte type)
Returns whether it is a custom data type- Parameters:
type- Data type as byte- Returns:
- boolean Whether given type is of custom type
-
-