Here you can find the source of readUB4(ByteBuffer buffer)
public static long readUB4(ByteBuffer buffer)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { public static long readUB4(ByteBuffer buffer) { long ret = (long) (buffer.get() & 0xff); ret |= (long) (buffer.get() & 0xff) << 8; ret |= (long) (buffer.get() & 0xff) << 16; ret |= (long) (buffer.get() & 0xff) << 24; return ret; }/* w w w. j ava 2s .com*/ }