Class SCMPFrameDecoder

java.lang.Object
org.serviceconnector.net.SCMPFrameDecoder

public class SCMPFrameDecoder extends Object
The Class SCMPFrameDecoder.
Author:
JTraber
  • Constructor Details

    • SCMPFrameDecoder

      protected SCMPFrameDecoder()
      Instantiates a new scmp frame decoder.
  • Method Details

    • parseFrameSize

      public static int parseFrameSize(byte[] buffer) throws FrameDecoderException
      Parses the frame size.
      Parameters:
      buffer - the buffer to parse
      Returns:
      the frame size
      Throws:
      FrameDecoderException - the frame decoder exception
    • parseMessageSize

      public static int parseMessageSize(byte[] buffer) throws Exception
      Parses the message size.
      Parameters:
      buffer - the buffer
      Returns:
      the int
      Throws:
      Exception - the exception
    • parseHeaderSize

      public static int parseHeaderSize(byte[] buffer) throws Exception
      Parses the header size.
      Parameters:
      buffer - the buffer
      Returns:
      the int
      Throws:
      Exception - the exception
    • readInt

      public static int readInt(byte[] b, int startOffset, int endOffset) throws Exception
      Read int from byte buffer.
      Parameters:
      b - the b
      startOffset - the start offset
      endOffset - the end offset
      Returns:
      the int
      Throws:
      FrameDecoderException - the frame decoder exception
      Exception