Package org.red5.io.object
Class DataTypes
java.lang.Object
org.red5.io.object.DataTypes
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
Modifier and TypeFieldDescriptionstatic final byte
Array type markerstatic final byte
Boolean type markerstatic final byte
ByteArray type marker (AMF3 only)static final byte
Date type markerstatic final byte
End markerstatic final byte
Map type markerstatic final byte
Null type markerstatic final byte
Number type markerstatic final byte
Object (Hash) type markerstatic final byte
Padding markerstatic final byte
String type markerstatic final byte
Switch decoding markerstatic final byte
Vector type markersstatic final byte
static final byte
static final byte
static final byte
XML type markerstatic final byte
Custom datatype AMF maskstatic final byte
Custom datatype JSON maskstatic final byte
Custom datatype mock mask markerstatic final byte
Custom datatype RTMP maskstatic final byte
Custom datatype XML maskstatic final byte
Reference type, this is optional for codecs to support -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isBasicType
(byte type) Returns whether it is a basic data typestatic boolean
isComplexType
(byte type) Returns whether it is a complex data typestatic boolean
isCustomType
(byte type) Returns whether it is a custom data typestatic String
toStringValue
(byte dataType) Returns the string value of the data type
-
Field Details
-
CORE_END_OBJECT
public static final byte CORE_END_OBJECTEnd marker- See Also:
-
CORE_SWITCH
public static final byte CORE_SWITCHSwitch decoding marker- See Also:
-
CORE_SKIP
public static final byte CORE_SKIPPadding marker- See Also:
-
CORE_NULL
public static final byte CORE_NULLNull type marker- See Also:
-
CORE_BOOLEAN
public static final byte CORE_BOOLEANBoolean type marker- See Also:
-
CORE_NUMBER
public static final byte CORE_NUMBERNumber type marker- See Also:
-
CORE_STRING
public static final byte CORE_STRINGString type marker- See Also:
-
CORE_DATE
public static final byte CORE_DATEDate type marker- See Also:
-
CORE_ARRAY
public static final byte CORE_ARRAYArray type marker- See Also:
-
CORE_MAP
public static final byte CORE_MAPMap type marker- See Also:
-
CORE_XML
public static final byte CORE_XMLXML type marker- See Also:
-
CORE_OBJECT
public static final byte CORE_OBJECTObject (Hash) type marker- See Also:
-
CORE_BYTEARRAY
public static final byte CORE_BYTEARRAYByteArray type marker (AMF3 only)- See Also:
-
OPT_REFERENCE
public static final byte OPT_REFERENCEReference type, this is optional for codecs to support- See Also:
-
CUSTOM_MOCK_MASK
public static final byte CUSTOM_MOCK_MASKCustom datatype mock mask marker- See Also:
-
CUSTOM_AMF_MASK
public static final byte CUSTOM_AMF_MASKCustom datatype AMF mask- See Also:
-
CUSTOM_RTMP_MASK
public static final byte CUSTOM_RTMP_MASKCustom datatype RTMP mask- See Also:
-
CUSTOM_JSON_MASK
public static final byte CUSTOM_JSON_MASKCustom datatype JSON mask- See Also:
-
CUSTOM_XML_MASK
public static final byte CUSTOM_XML_MASKCustom datatype XML mask- See Also:
-
CORE_VECTOR_INT
public static final byte CORE_VECTOR_INTVector type markers- See Also:
-
CORE_VECTOR_UINT
public static final byte CORE_VECTOR_UINT- See Also:
-
CORE_VECTOR_NUMBER
public static final byte CORE_VECTOR_NUMBER- See Also:
-
CORE_VECTOR_OBJECT
public static final byte CORE_VECTOR_OBJECT- See Also:
-
-
Constructor Details
-
DataTypes
public DataTypes()
-
-
Method Details
-
toStringValue
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
true
if data type is primitive,false
otherwise
-
isComplexType
public static boolean isComplexType(byte type) Returns whether it is a complex data type- Parameters:
type
- Data type as byte- Returns:
- boolean
true
if data type is complex (non-primitive),false
otherwise
-
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
-