Hello, World!
I’m glad you found this place from somewhere on the Internet!
Hope the following Java code snippet may give you the idea of this post ;)
System.out.print(
IntStream.of(1214606444, 1865162839, 1869769828, 555753482)
.mapToObj(n -> IntStream.iterate(24, i -> i >= 0, i -> i - 8)
.boxed()
.map(i -> (n & 255 << i) >> i)
.collect(() -> ByteBuffer.allocate(4),
(r, e) -> r.put(e.byteValue()),
ByteBuffer::put))
.map(b -> new String(b.array(), StandardCharsets.UTF_8))
.collect(Collectors.joining())
);
Tip: You need JDK 9 or higher to compile the code above, or if you were lazy like me :P, click here to see the output.
Comments Go back to the top