Package ru.bitel.bgbilling.server.util
Class ByteParser
java.lang.Object
ru.bitel.bgbilling.server.util.ByteParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]byte[]getBytesSwap(int startPos, int length, String name) intПолучить int из байтовintgetIntSwap(int startPos, int length, String name) Аналог getInt но число переворачиваетсяlongintgetReverseInt(int startPos, int length, String name) longgetReverseLong(int startPos, int length, String name) intlength()
-
Constructor Details
-
ByteParser
public ByteParser(byte[] data)
-
-
Method Details
-
length
public int length() -
getInt
public int getInt(int startPos, int length, String name) throws ru.bitel.bgbilling.common.BGException Получить int из байтов- Parameters:
startPos- - начало расположенияlength- - количество байтname-- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
getIntSwap
public int getIntSwap(int startPos, int length, String name) throws ru.bitel.bgbilling.common.BGException Аналог getInt но число переворачивается- Parameters:
startPos-length-name-- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
getReverseInt
public int getReverseInt(int startPos, int length, String name) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getLong
public long getLong(int startPos, int length, String name) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getReverseLong
public long getReverseLong(int startPos, int length, String name) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getBytes
public byte[] getBytes(int startPos, int length, String name) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getBytesSwap
public byte[] getBytesSwap(int startPos, int length, String name) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-