Package com.wowza.wms.amf
Class AMF3Utils
- Object
-
- com.wowza.wms.amf.AMF3Utils
-
public class AMF3Utils extends Object
AMF3 utilities
-
-
Constructor Summary
Constructors Constructor Description AMF3Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Date
deserializeDate(java.nio.ByteBuffer data)
Deserialize date typestatic int
deserializeInt(java.nio.ByteBuffer data)
Deserialize intstatic String
deserializeString(java.nio.ByteBuffer data)
Deserialize stringstatic String
deserializeString(java.nio.ByteBuffer data, int utflen)
Deserialize stringstatic String
deserializeString(java.nio.ByteBuffer data, AMFDataContextDeserialize context)
Deserialize stringstatic int
serializeDate(java.io.DataOutputStream out, java.util.Date date)
Serialize a date objectstatic int
serializeInt(java.io.DataOutputStream out, int val)
Serialize int valuestatic int
serializeString(java.io.DataOutputStream out, String str)
Serialize a string valuestatic int
serializeStringNoLength(java.io.DataOutputStream out, String str)
Serialize string but do not write the lengthstatic void
serializeZeroLengthString(java.io.DataOutputStream out)
Serialize empty string
-
-
-
Method Detail
-
deserializeDate
public static java.util.Date deserializeDate(java.nio.ByteBuffer data)
Deserialize date type- Parameters:
data
- buffer- Returns:
- date
-
serializeDate
public static int serializeDate(java.io.DataOutputStream out, java.util.Date date)
Serialize a date object- Parameters:
out
- output streamdate
- date- Returns:
- number of bytes written
-
deserializeInt
public static int deserializeInt(java.nio.ByteBuffer data)
Deserialize int- Parameters:
data
- buffer- Returns:
- int value
-
serializeInt
public static int serializeInt(java.io.DataOutputStream out, int val)
Serialize int value- Parameters:
out
- output streamval
- int value- Returns:
- number of bytes written
-
deserializeString
public static String deserializeString(java.nio.ByteBuffer data, AMFDataContextDeserialize context) throws java.io.IOException
Deserialize string- Parameters:
data
- datacontext
- AMF context- Returns:
- string value
- Throws:
java.io.IOException
-
deserializeString
public static String deserializeString(java.nio.ByteBuffer data) throws java.io.IOException
Deserialize string- Parameters:
data
- data- Returns:
- string value
- Throws:
java.io.IOException
-
deserializeString
public static String deserializeString(java.nio.ByteBuffer data, int utflen) throws java.io.IOException
Deserialize string- Parameters:
data
- datautflen
- len of the string- Returns:
- string value
- Throws:
java.io.IOException
-
serializeZeroLengthString
public static void serializeZeroLengthString(java.io.DataOutputStream out)
Serialize empty string- Parameters:
out
- output stream
-
serializeStringNoLength
public static int serializeStringNoLength(java.io.DataOutputStream out, String str) throws java.io.IOException
Serialize string but do not write the length- Parameters:
out
- output streamstr
- string value- Returns:
- number of bytes written
- Throws:
java.io.IOException
-
serializeString
public static int serializeString(java.io.DataOutputStream out, String str) throws java.io.IOException
Serialize a string value- Parameters:
out
- output streamstr
- string value- Returns:
- number of bytes written
- Throws:
java.io.IOException
-
-