title: Strange characters from a device usb using inputstream bytes[] java
body: <p>i have to get some of data that the pc receives via device usb connected.
  I get to connect to the serial port(with javacomm librarys) and receive data every two minutes that sends the device. These data, store them in a byte[] and show it to InputStream something like this:</p>
  
  <blockquote>
    <p><code>try {
         int count = inputStream.available();
         byte[] bs = new byte[count];
         System.out.print(inputStream.read(bs));//also with (bs,0,count)..<br>
    } catch (IOException e) {  }</code></p>
  </blockquote>
  
  <p>But this shows always 0 (zero). I have tried with others methods eg directly printing de byte[] and the output is " [B@e35bb7  " i don't know what is this...</p>
  
  <blockquote>
    <p><code>try {
        System.out.println(bs); 
    } catch (IOException e) { }</code></p>
  </blockquote>
  
  <p>I tried to convert it to String:</p>
  
  <blockquote>
    <p><code>try {
        String me=bs.toString();
        String txtohex=String.format("%04x", new BigInteger(1, me.getBytes("UTF-8")));
        System.out.println(txtohex);//returns 5b424031633765326461<br>
       } catch (IOException e) {  }</code></p>
  </blockquote>
  
  <p>or :</p>
  
  <p><code>try {<br>
         StringBuilder sb = new StringBuilder();<br>
         for (byte b : bs){
           sb.append(String.format("%02X ", b));<br>
         }
         System.out.println(sb.toString());//returns C4 3C 00 A0 00 00 00 00 00 
     } catch (IOException e) {  }</code></p>
  
  <p>But this is wrong because I'm converting string [B@e35bb7. From device I have to get a very long either binary or hexadecimal string and this I am getting not is. What can I do more to receive exactly what the device sends me?</p>