Converting seven segment to number : <p>I want to convert seven segment <strong>numbers</strong> to normal string in java. For example, if input string like this</p>

<p>input</p>

<pre><code>   _  _     _  _  _  _  _  _   
 | _| _||_||_ |_   ||_||_|| |
 ||_  _|  | _||_|  ||_| _||_|
</code></pre>

<p>output should be like</p>

<pre><code>1234567890
</code></pre>

<p>I have found <a href="https://stackoverflow.com/a/42178177/9114020">this JavaScript</a> answer, and I'm trying to convert it to java.</p>

<p>for now I have:</p>

<pre><code>private static void get7segment(String ascii) 
    {
        String[] splited="909561432".split("");
        HashMap&lt;Integer,Integer&gt; map=new HashMap&lt;Integer,Integer&gt;();
        map.put(0, 63);
        map.put(1, 6);
        map.put(2, 91);
        map.put(3, 79);
        map.put(4, 102);
        map.put(5, 109);
        map.put(6, 125);
        map.put(7, 7);
        map.put(8, 127);
        map.put(9, 111);            
    }
</code></pre>

<p>any help would be appricheate</p>
