Read an unsigned integer from the given byte array

@param bytes The bytes to read from
@param offset The offset to begin reading at
@return The integer as a long
346525
public static long readUnsignedInt(byte[] bytes, int offset) {
        return (((bytes[offset + 0] & 0xffL) << 24) | ((bytes[offset + 1] & 0xffL) << 16)
                | ((bytes[offset + 2] & 0xffL) << 8) | (bytes[offset + 3] & 0xffL));
    }
664442
public static void longToBytes(long value, byte[] bytes, int offset) {
        for (int i = offset + 7; i >= offset; --i) {
            bytes[i] = (byte) value;
            value = value >> 8;
        }
    }
41877
public int read(byte []buffer, int offset, int length)
    throws IOException
  {
    int len = _next.read(buffer, offset, length);

    _crc = Crc64.generate(_crc, buffer, offset, len);

    return len;
  }
274025
def _read_offset_value(self, f, offset, size):
        '''
        
        '''
        f.seek(offset, 0)
        if (size == 8):
            return int.from_bytes(f.read(8), 'big', signed=True)
        else:
            return int.from_bytes(f.read(4), 'big', signed=True)
847314
public int read(byte []buf, int offset, int length) throws IOException
  {
    if (_stream != null)
      return _stream.read(buf, offset, length);
    else
      return -1;
  }
651593
public int read(byte []buf, int offset, int length) throws IOException
  {
    int strlen = _length;

    int start = offset;
    int end = offset + length;
    
    int index = _index;
    for (; index < strlen && offset < end; index++) {
      int ch = _string.charAt(index);

      if (ch < 0x80)
        buf[offset++] = (byte) ch;
      else if (ch < 0x800 && offset + 1 < end) {
        buf[offset++] = (byte) (0xc0 | (ch >> 6));
        buf[offset++] = (byte) (0x80 | (ch & 0x3f));
      }
      else if (ch < 0x8000 && offset + 2 < end) {
        buf[offset++] = (byte) (0xe0 | (ch >> 12));
        buf[offset++] = (byte) (0x80 | ((ch >> 6) & 0x3f));
        buf[offset++] = (byte) (0x80 | ((ch >> 6) & 0x3f));
      }
      else if (offset == start) {
        throw new IllegalStateException("buffer length is not large enough to decode UTF-8 data");
      }
      else {
        break;
      }
    }

    _index = index;

    return start < offset ? offset - start : -1;
  }
1124784
public static long parseBE4BytesAsUnsigned(byte[] data, int offset)
    {
        long value = ((long)(data[offset + 0] & 0xFF) << 24)
                   | ((long)(data[offset + 1] & 0xFF) << 16)
                   | ((long)(data[offset + 2] & 0xFF) <<  8)
                   | ((long)(data[offset + 3] & 0xFF) <<  0);

        return value;
    }
511274
public static final int getInt(byte[] data, int offset)
   {
      int result = 0;
      int i = offset;
      for (int shiftBy = 0; shiftBy < 32; shiftBy += 8)
      {
         result |= ((data[i] & 0xff)) << shiftBy;
         ++i;
      }
      return result;
   }
40754
def read_byte(self, base, offset=0):
        
        fmt = 'B'
        return self._read_int(fmt, base, offset)
749980
private static long byteArrayToLong(byte[] ba, int offset) {
		long l = 0;

		for (int i = 0; i < SIZE_OF_LONG; ++i) {
			l |= (ba[offset + SIZE_OF_LONG - 1 - i] & 0xffL) << (i << 3);
		}

		return l;
	}
366570
public static long readLong(byte[] bytes, int start) {
        return ((long) (readInt(bytes, start)) << 32) +
            (readInt(bytes, start + 4) & 0xFFFFFFFFL);
    }
555214
public static double bytes_to_double(byte[] bytes, int offset) {
		try {
			long result = bytes[0+offset] & 0xff;
			result <<= 8;
			result |= bytes[1+offset] & 0xff;
			result <<= 8;
			result |= bytes[2+offset] & 0xff;
			result <<= 8;
			result |= bytes[3+offset] & 0xff;
			result <<= 8;
			result |= bytes[4+offset] & 0xff;
			result <<= 8;
			result |= bytes[5+offset] & 0xff;
			result <<= 8;
			result |= bytes[6+offset] & 0xff;
			result <<= 8;
			result |= bytes[7+offset] & 0xff;
			return Double.longBitsToDouble(result);
		} catch (IndexOutOfBoundsException x) {
			throw new PickleException("decoding double: too few bytes");
		}
	}
937711
public static final int readInt(byte[] array, int offset)
    {
        if (array.length < offset + 4)
        {
            throw new IllegalArgumentException("no room in array");
        }
        return
                ((array[offset]<<24) & 0xff000000) +
                ((array[offset + 1]<<16) & 0xff0000)  +
                ((array[offset + 2]<<8) & 0xff00)  +
                (array[offset + 3] & 0xff );
    }
697145
public static long getLongLE(final byte[] array, final int offset) {
    return  ( array[offset    ] & 0XFFL       )
          | ((array[offset + 1] & 0XFFL) <<  8)
          | ((array[offset + 2] & 0XFFL) << 16)
          | ((array[offset + 3] & 0XFFL) << 24)
          | ((array[offset + 4] & 0XFFL) << 32)
          | ((array[offset + 5] & 0XFFL) << 40)
          | ((array[offset + 6] & 0XFFL) << 48)
          | ((array[offset + 7] & 0XFFL) << 56);
  }
217974
public int readUnsignedShort(final int offset) throws IOException {
        final int bytesToRead = Math.max(0, offset + 2 - used);
        if (bytesToRead > 0) {
            readMore(bytesToRead);
        }
        return ((buf[offset] & 0xff) << 8) //
                | (buf[offset + 1] & 0xff);
    }
540975
@Override
	public int read(byte[] buffer, int offset, int len) throws IOException {
		return this.in.read(buffer, offset, len);
	}
1096062
public int read(byte []buffer, int offset, int length)
    throws IOException
  {
    log.finest("random-read(0x" + Long.toHexString(getFilePointer()) + "," +
               length + ")");
    
    return _file.read(buffer, offset, length);
  }