Lines Matching +defs:val +defs:data
85 * @param data the array containing the bytes of the integer value
90 public static final int readLittleEndian(byte[] data, int pos, int size) {
94 retVal += (data[pos] & 0xff) << shifter;
102 public static final int readBigEndian(byte[] data, int pos, int size) {
106 retVal += (data[pos] & 0xff) << shifter;
117 * @param val the integer value. It will lose the high-order two bytes.
121 public static final void writeInt(int val, OutputStream os)
123 os.write(val>>>8);
124 os.write(val);
130 * @param val the integer value. It will lose the high-order two bytes.
134 public static final int writeInt(int val, byte[] dest, int pos) {
135 dest[pos++] = (byte)(val>>>8);
136 dest[pos++] = (byte)val;