public static long readLong(InputStream inputStream) throws IOException {
        byte[] byteArray = new byte[8];

        // Read in the next 8 bytes
        inputStream.read(byteArray);

        long number = convertLongFromBytes(byteArray);

        return number;
    }
Read in a long from an InputStream

@param inputStream
           The InputStream used to read the long
@return A long, which is the next 8 bytes converted from the InputStream
@throws IOException
            Thrown if there is a problem reading from the InputStream
jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java