title: Converting bytes to string in clojure
body: <p>I am converting a byte array in clojure into a string and I am facing a weird problem and I don't know the reason why.</p>
  
  <p>The byte array is defined as </p>
  
  <pre><code>(def a (byte-array  (byte 72) (byte 105)))
  </code></pre>
  
  <p>when I convert it into a vector it shows</p>
  
  <pre><code>(vec a)
  </code></pre>
  
  <blockquote>
    <p>output: (105, 105, 105, ......68 times ...., 105)</p>
  </blockquote>
  
  <p>The output is an array of 105 with 72 elements. Why is it so? I am trying to convert a byte array into a string and using </p>
  
  <pre><code>(String. (byte-array (byte 72) (byte 105)))
  </code></pre>
  
  <p>yields 72 i's. On the other hand when I do </p>
  
  <pre><code>(map char [(byte 72) (byte 105)])
  </code></pre>
  
  <p>I get the output H and I. That's why I am trying to convert the byte array into a vector. If there is an alternate way of doing it please let me know. </p>