Here you can find the source of decodeTimeWithoutSign(byte firstByte, ByteBuffer buffer)
public static long decodeTimeWithoutSign(byte firstByte, ByteBuffer buffer)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { private static final byte OB_DATETIME_LEN_MASK = 0x03; public static long decodeTimeWithoutSign(byte firstByte, ByteBuffer buffer) {// ww w .j a va 2s .co m int lenMark = firstByte & OB_DATETIME_LEN_MASK; int len = 0; if (lenMark == 0) { len = 4; } else if (lenMark == 1) { len = 6; } else if (lenMark == 2) { len = 8; } long value = 0; for (int n = 0; n < len; n++) { value |= ((buffer.get() & 0xffl) << (n << 3)); } return value; } }