### Question:
ByteUtils { public static int readUnsignedIntLE(InputStream in) throws IOException { return in.read() | (in.read() << 8) | (in.read() << 16) | (in.read() << 24); } 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);  }### Answer:
@Test public void testReadUnsignedIntLEFromArray() { byte[] array1 = {0x01, 0x02, 0x03, 0x04, 0x05}; assertEquals(0x04030201, ByteUtils.readUnsignedIntLE(array1, 0)); assertEquals(0x05040302, ByteUtils.readUnsignedIntLE(array1, 1)); byte[] array2 = {(byte) 0xf1, (byte) 0xf2, (byte) 0xf3, (byte) 0xf4, (byte) 0xf5, (byte) 0xf6}; assertEquals(0xf4f3f2f1, ByteUtils.readUnsignedIntLE(array2, 0)); assertEquals(0xf6f5f4f3, ByteUtils.readUnsignedIntLE(array2, 2)); }
@Test public void testReadUnsignedIntLEFromInputStream() throws IOException { byte[] array1 = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09}; ByteArrayInputStream is1 = new ByteArrayInputStream(array1); assertEquals(0x04030201, ByteUtils.readUnsignedIntLE(is1)); assertEquals(0x08070605, ByteUtils.readUnsignedIntLE(is1)); byte[] array2 = {(byte) 0xf1, (byte) 0xf2, (byte) 0xf3, (byte) 0xf4, (byte) 0xf5, (byte) 0xf6, (byte) 0xf7, (byte) 0xf8}; ByteArrayInputStream is2 = new ByteArrayInputStream(array2); assertEquals(0xf4f3f2f1, ByteUtils.readUnsignedIntLE(is2)); assertEquals(0xf8f7f6f5, ByteUtils.readUnsignedIntLE(is2)); }