throws NoSuchFieldException, IllegalAccessException {
// work around permissions issues
Field f = Unsafe.class.getDeclaredField("theUnsafe");
f.setAccessible(true);
Unsafe unsafe = (Unsafe)f.get(null);
long addr = unsafe.allocateMemory(100);
// test of endianness
unsafe.putLong(addr, 1);
System.out.println(unsafe.getByte(addr));