OK, so what you are asking, is how to convert a number encoded as a decimal string, into a number encoded in a binary string.
String subject=“5”;
Long num = Long.parseLong(subject);
String binaryString = Long.toString(num,2);
System.out.println(binaryString);
Prints ‘101’.
It’s a very unusual requirement and an extremely inefficient way of storing values. May I ask why you need it?
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services