/****************************************************************************** * This program converts input stream of characters to Unicode codepoints in hexadecimal. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ import org.pureprogrammer.Utils; public class HexadecimalFilterUnicode { public static void main(String[] args) { int c; String hex; int count = 0; while ((c = Utils.getchar()) != -1) { ++count; hex = Utils.format("{0:06x} ", c); System.out.print(hex); if (count % 10 == 0) { System.out.println(); } } } }