@Test public void testReadUnsignedInt() { ByteBuffer buffer = ByteBuffer.allocate(4); long writeValue = 133444; ByteUtils.writeUnsignedInt(buffer, writeValue); buffer.flip(); long readValue = ByteUtils.readUnsignedInt(buffer); assertEquals(writeValue, readValue); }
public static long readUnsignedInt(ByteBuffer buffer) { return buffer.getInt() & 0xffffffffL; }
ByteUtils { public static long readUnsignedInt(ByteBuffer buffer) { return buffer.getInt() & 0xffffffffL; } }
ByteUtils { public static long readUnsignedInt(ByteBuffer buffer) { return buffer.getInt() & 0xffffffffL; } private  ByteUtils(); }
ByteUtils { public static long readUnsignedInt(ByteBuffer buffer) { return buffer.getInt() & 0xffffffffL; } private  ByteUtils(); static long readUnsignedInt(ByteBuffer buffer); static long readUnsignedInt(ByteBuffer buffer, int index); static int readUnsignedIntLE(InputStream in); static int readUnsignedIntLE(byte[] buffer, int offset); static void writeUnsignedInt(ByteBuffer buffer, int index, long value); static void writeUnsignedInt(ByteBuffer buffer, long value); static void writeUnsignedIntLE(OutputStream out, int value); static void writeUnsignedIntLE(byte[] buffer, int offset, int value); static int readVarint(ByteBuffer buffer); static int readVarint(DataInput in); static long readVarlong(DataInput in); static long readVarlong(ByteBuffer buffer); static void writeVarint(int value, DataOutput out); static void writeVarint(int value, ByteBuffer buffer); static void writeVarlong(long value, DataOutput out); static void writeVarlong(long value, ByteBuffer buffer); static int sizeOfVarint(int value); static int sizeOfVarlong(long value); }
ByteUtils { public static long readUnsignedInt(ByteBuffer buffer) { return buffer.getInt() & 0xffffffffL; } private  ByteUtils(); static long readUnsignedInt(ByteBuffer buffer); static long readUnsignedInt(ByteBuffer buffer, int index); static int readUnsignedIntLE(InputStream in); static int readUnsignedIntLE(byte[] buffer, int offset); static void writeUnsignedInt(ByteBuffer buffer, int index, long value); static void writeUnsignedInt(ByteBuffer buffer, long value); static void writeUnsignedIntLE(OutputStream out, int value); static void writeUnsignedIntLE(byte[] buffer, int offset, int value); static int readVarint(ByteBuffer buffer); static int readVarint(DataInput in); static long readVarlong(DataInput in); static long readVarlong(ByteBuffer buffer); static void writeVarint(int value, DataOutput out); static void writeVarint(int value, ByteBuffer buffer); static void writeVarlong(long value, DataOutput out); static void writeVarlong(long value, ByteBuffer buffer); static int sizeOfVarint(int value); static int sizeOfVarlong(long value);  }