| java.lang.Object com.martiansoftware.nailgun.LongUtils
LongUtils | class LongUtils (Code) | | Provides a couple of utility methods that help in reading/writin
chunks of data in the Nailgun protocol.
author: Marty Lamb |
Method Summary | |
public static long | fromArray(byte[] b, int offset) Reads a 4-byte big-endian long from the specified array,
beginnin at the specified offset. | public static void | toArray(long l, byte[] b, int offset) Encodes the specified long in 4 consecutive bytes (big-endian)
in the specified array, beginning at the specified offset. |
fromArray | public static long fromArray(byte[] b, int offset)(Code) | | Reads a 4-byte big-endian long from the specified array,
beginnin at the specified offset.
Parameters: b - the array containing the encoded long Parameters: offset - the offset into the array at which the encodedlong begins the decoded long |
toArray | public static void toArray(long l, byte[] b, int offset)(Code) | | Encodes the specified long in 4 consecutive bytes (big-endian)
in the specified array, beginning at the specified offset.
Parameters: l - the long to encode Parameters: b - the array into which the long should be written Parameters: offset - the offset into the array at which the writingshould begin |
|
|