Home | History | Annotate | Download | only in fat

Lines Matching refs:offset

34      * the given offset.
36 * @param src the byte offset where to read the value from
37 * @param offset the byte array to extract the value from
40 public static int getUInt8(byte[] src, int offset) {
41 return src[offset] & 0xFF;
45 * Gets a 16-bit unsigned integer from the given byte array at the given offset.
48 * @param offset
50 public static int getUInt16(byte[] src, int offset) {
51 final int v0 = src[offset + 0] & 0xFF;
52 final int v1 = src[offset + 1] & 0xFF;
57 * Gets a 32-bit unsigned integer from the given byte array at the given offset.
60 * @param offset
62 public static long getUInt32(byte[] src, int offset) {
63 final long v0 = src[offset + 0] & 0xFF;
64 final long v1 = src[offset + 1] & 0xFF;
65 final long v2 = src[offset + 2] & 0xFF;
66 final long v3 = src[offset + 3] & 0xFF;
71 * Sets an 8-bit integer in the given byte array at the given offset.
73 public static void setInt8(byte[] dst, int offset, int value) {
74 dst[offset] = (byte) value;
78 * Sets a 16-bit integer in the given byte array at the given offset.
80 public static void setInt16(byte[] dst, int offset, int value) {
81 dst[offset + 0] = (byte) (value & 0xFF);
82 dst[offset + 1] = (byte) ((value >>> 8) & 0xFF);
86 * Sets a 32-bit integer in the given byte array at the given offset.
88 public static void setInt32(byte[] dst, int offset, long value)
96 dst[offset + 0] = (byte) (value & 0xFF);
97 dst[offset + 1] = (byte) ((value >>> 8) & 0xFF);
98 dst[offset + 2] = (byte) ((value >>> 16) & 0xFF);
99 dst[offset + 3] = (byte) ((value >>> 24) & 0xFF);