public interface WebSocketPacket
| Modifier and Type | Method and Description |
|---|---|
String |
getASCII()
Interprets the data packet as a US-ASCII string and returns the string
in US-ASCII encoding.
|
byte[] |
getByteArray()
Returns the content of the data packet as an array of bytes.
|
Date |
getCreationDate() |
WebSocketFrameType |
getFrameType() |
String |
getString()
Returns the content of the data packet as a string using default
encoding.
|
String |
getString(String aEncoding)
Returns the content of the data packet as a string using the passed
encoding.
|
String |
getUTF8()
Interprets the data packet as a UTF8 string and returns the string
in UTF-8 encoding.
|
void |
initFragmented(int aTotal) |
boolean |
isComplete() |
boolean |
isFragmented() |
boolean |
isTimedOut() |
void |
packFragments() |
void |
setASCII(String aString)
Sets the value of the data packet to the given string by using
7 bit US-ASCII encoding.
|
void |
setByteArray(byte[] aByteArray)
Sets the value of the data packet to the given array of bytes.
|
void |
setCreationDate(Date aDate) |
void |
setFragment(String aString,
int aIdx) |
void |
setFrameType(WebSocketFrameType aFrameType) |
void |
setString(String aString)
Sets the value of the data packet to the given string by using
default encoding.
|
void |
setString(String aString,
String aEncoding)
Sets the value of the data packet to the given string by using
the passed encoding.
|
void |
setTimeout(long aMilliseconds) |
void |
setUTF8(String aString)
Sets the value of the data packet to the given string by using
UTF-8 encoding.
|
void setByteArray(byte[] aByteArray)
aByteArray - boolean isFragmented()
boolean isComplete()
void setFragment(String aString, int aIdx)
aString - aStart - void packFragments()
void setCreationDate(Date aDate)
aDate - Date getCreationDate()
void setTimeout(long aMilliseconds)
aMilliseconds - boolean isTimedOut()
void initFragmented(int aTotal)
aTotal - void setString(String aString)
aString - void setString(String aString, String aEncoding) throws UnsupportedEncodingException
aString - aEncoding - UnsupportedEncodingExceptionvoid setUTF8(String aString)
aString - void setASCII(String aString)
aString - byte[] getByteArray()
String getString()
String getString(String aEncoding) throws UnsupportedEncodingException
aEncoding - UnsupportedEncodingExceptionString getUTF8()
null if not convertible.String getASCII()
null if not convertible.WebSocketFrameType getFrameType()
void setFrameType(WebSocketFrameType aFrameType)
aFrameType - Copyright © 2013. All Rights Reserved.