title: How do I print an array in Java's jdb debugger?
body: <p>How do I print out the values of the byte array all at once? I seem to recall I could specify a memory range in gdb. Is similar functionality is available in jdb?</p>
  
  <p>I have a Java byte array:</p>
  
  <pre><code>byte [] decompressed = new byte[OUTPUT_FILE_IO_BUFFER_SIZE];
  </code></pre>
  
  <p>which I populate from a String:</p>
  
  <pre><code>System.arraycopy(decompressedString.getBytes(), 0, decompressed, 0, 
                           decompressedString.length());
  </code></pre>
  
  <p>In jdb, I want to print the contents of the byte array. I tried</p>
  
  <pre><code>main[1] print decompressed
  </code></pre>
  
  <p>which returns:</p>
  
  <pre><code> decompressed = instance of byte[7] (id=342)
  </code></pre>