|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.http.socket.DataFrame
public class DataFrame
The DataFrame object represents a frame as defined in
RFC 6455. A frame is a very lightweight envelope used to send
control information and either text or binary user data. Typically
a frame will represent a single message however, it is possible
to fragment a single frame up in to several frames. A fragmented
frame has a specific FrameType indicating that it
is a continuation frame.
Data| Constructor Summary | |
|---|---|
DataFrame(FrameType type)
Constructor for the DataFrame object. |
|
DataFrame(FrameType type,
byte[] data)
Constructor for the DataFrame object. |
|
DataFrame(FrameType type,
byte[] data,
boolean last)
Constructor for the DataFrame object. |
|
DataFrame(FrameType type,
Data data)
Constructor for the DataFrame object. |
|
DataFrame(FrameType type,
Data data,
boolean last)
Constructor for the DataFrame object. |
|
DataFrame(FrameType type,
String text)
Constructor for the DataFrame object. |
|
DataFrame(FrameType type,
String text,
boolean last)
Constructor for the DataFrame object. |
|
| Method Summary | |
|---|---|
byte[] |
getBinary()
This returns the binary payload that is to be sent with the frame. |
Frame |
getFrame(FrameType type)
This method is used to convert from one frame type to another. |
String |
getText()
This returns the text payload that is to be sent with the frame. |
FrameType |
getType()
This is used to determine the type of frame. |
boolean |
isFinal()
This is used to determine if the frame is the final frame in a sequence of fragments or a whole frame. |
String |
toString()
This returns the text payload that is to be sent with the frame. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataFrame(FrameType type)
DataFrame object. This is used
to create a frame using the specified data and frame type. A
zero payload is created using this constructor and is suitable
only for specific control frames such as connection termination.
type - this is the frame type used for this instance
public DataFrame(FrameType type,
byte[] data)
DataFrame object. This is used
to create a frame using the specified data and frame type. In
some cases a control frame may require a zero length payload.
type - this is the frame type used for this instancedata - this is the payload for this frame
public DataFrame(FrameType type,
byte[] data,
boolean last)
DataFrame object. This is used
to create a frame using the specified data and frame type. In
some cases a control frame may require a zero length payload.
type - this is the frame type used for this instancedata - this is the payload for this framelast - true if this is not a fragment in a sequence
public DataFrame(FrameType type,
String text)
DataFrame object. This is used
to create a frame using the specified data and frame type. In
some cases a control frame may require a zero length payload.
type - this is the frame type used for this instancedata - this is the payload for this frame
public DataFrame(FrameType type,
String text,
boolean last)
DataFrame object. This is used
to create a frame using the specified data and frame type. In
some cases a control frame may require a zero length payload.
type - this is the frame type used for this instancedata - this is the payload for this framelast - true if this is not a fragment in a sequence
public DataFrame(FrameType type,
Data data)
DataFrame object. This is used
to create a frame using the specified data and frame type. In
some cases a control frame may require a zero length payload.
type - this is the frame type used for this instancedata - this is the payload for this frame
public DataFrame(FrameType type,
Data data,
boolean last)
DataFrame object. This is used
to create a frame using the specified data and frame type. In
some cases a control frame may require a zero length payload.
type - this is the frame type used for this instancedata - this is the payload for this framelast - true if this is not a fragment in a sequence| Method Detail |
|---|
public boolean isFinal()
isFinal in interface Framepublic byte[] getBinary()
getBinary in interface Framepublic String getText()
getText in interface Framepublic Frame getFrame(FrameType type)
getFrame in interface Frametype - this is the frame type to convert to
public FrameType getType()
getType in interface Framepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||