Package org.serviceconnector.net
Class SCMPFrameDecoder
java.lang.Object
org.serviceconnector.net.SCMPFrameDecoder
The Class SCMPFrameDecoder.
- Author:
- JTraber
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstantiates a new scmp frame decoder. -
Method Summary
Modifier and TypeMethodDescriptionstatic intparseFrameSize(byte[] buffer) Parses the frame size.static intparseHeaderSize(byte[] buffer) Parses the header size.static intparseMessageSize(byte[] buffer) Parses the message size.static intreadInt(byte[] b, int startOffset, int endOffset) Read int from byte buffer.
-
Constructor Details
-
SCMPFrameDecoder
protected SCMPFrameDecoder()Instantiates a new scmp frame decoder.
-
-
Method Details
-
parseFrameSize
Parses the frame size.- Parameters:
buffer- the buffer to parse- Returns:
- the frame size
- Throws:
FrameDecoderException- the frame decoder exception
-
parseMessageSize
Parses the message size.- Parameters:
buffer- the buffer- Returns:
- the int
- Throws:
Exception- the exception
-
parseHeaderSize
Parses the header size.- Parameters:
buffer- the buffer- Returns:
- the int
- Throws:
Exception- the exception
-
readInt
Read int from byte buffer.- Parameters:
b- the bstartOffset- the start offsetendOffset- the end offset- Returns:
- the int
- Throws:
FrameDecoderException- the frame decoder exceptionException
-