Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/* 
 * This file is part of the HyperGraphDB source distribution. This is copyrighted 
 * software. For permitted uses, licensing options and redistribution, please see  
 * the LicensingInformation file at the root level of the distribution.  
 * 
 * Copyright (c) 2005-2010 Kobrix Software, Inc.  All rights reserved. 
 */

public class Main {
    public static long readLong(byte[] bytes, int offset) {
        return new Long((((long) bytes[offset] << 56) + ((long) (bytes[offset + 1] & 255) << 48)
                + ((long) (bytes[offset + 2] & 255) << 40) + ((long) (bytes[offset + 3] & 255) << 32)
                + ((long) (bytes[offset + 4] & 255) << 24) + ((bytes[offset + 5] & 255) << 16)
                + ((bytes[offset + 6] & 255) << 8) + ((bytes[offset + 7] & 255) << 0)));
    }
}