Java: How to get a bi-directional numeric representation of a string?
<p>I need to compute a numeric representation of a string which is bi-direction. For example, If I have a string "US" I would like an algorithm which when applied to "US" generates a number X (int or long). When another algorithm is applied to X, I want to get "US". Each string consists of two characters.</p>

<p>Thanks in advance.</p>
