ninio-snmp/src/main/java/com/davfx/ninio/snmp/BerReader.java
private static long doReadLong(ByteBuffer buffer, int length) throws IOException {
		long value = 0L;
		for (int i = 0; i < length; i++) {
			int b = buffer.get() & 0xFF;
			if ((i == 0) && ((b & 0x80) == 0x80)) {
				value = 0xFFFFFFFFL; // Negative, in two's complement form
			}
			value <<= 8;
			value |= b;
		}

		return value;
	}
private static long doReadLong(ByteBuffer buffer, int length) throws IOException {
		long value = 0L;
		for (int i = 0; i < length; i++) {
			int b = buffer.get() & 0xFF;
			if ((i == 0) && ((b & 0x80) == 0x80)) {
				value = 0xFFFFFFFFL; // Negative, in two's complement form
			}
			value <<= 8;
			value |= b;
		}

		return value;
	}
TODO Check the OPAQUE UINT64 format