com.vodafone360.people.service.io.rpg
Class RpgHelper
java.lang.Object
com.vodafone360.people.service.io.rpg.RpgHelper
public class RpgHelper
- extends java.lang.Object
RPG helper functions, Splitting of RPG response data into individual RPG
responses, int <--> byte conversion.
Method Summary |
protected static byte[] |
intToSignedBytes(int integer)
Splits an integer into a signed byte-array. |
protected static int |
signedBytesToInt(byte byte1,
byte byte2,
byte byte3,
byte byte4)
Generate int value from 4 signed bytes |
static void |
splitRpgResponse(java.io.InputStream inputStream,
java.util.List<RpgMessage> msgs)
Split single RPG response into individual RPG request responses |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RPG_HEADER_LENGTH
private static final int RPG_HEADER_LENGTH
- See Also:
- Constant Field Values
RpgHelper
public RpgHelper()
intToSignedBytes
protected static final byte[] intToSignedBytes(int integer)
- Splits an integer into a signed byte-array.
- Parameters:
integer
- The int to convert into bytes.
- Returns:
- The byte-array containing the bytes of the int.
signedBytesToInt
protected static final int signedBytesToInt(byte byte1,
byte byte2,
byte byte3,
byte byte4)
- Generate int value from 4 signed bytes
- Parameters:
byte1
- 1st (most significant) byte.byte2
- 2nd byte.byte3
- 3rd byte.byte4
- 4th byte.
- Returns:
- integer value generated from input bytes
splitRpgResponse
public static void splitRpgResponse(java.io.InputStream inputStream,
java.util.List<RpgMessage> msgs)
throws java.io.IOException
- Split single RPG response into individual RPG request responses
- Parameters:
inputStream
- byte array containing RPG responsemsgs
- array of RPG messages (consisting of RPG header and Hessian
encoded message body)
- Throws:
java.io.IOException
JavaDoc