title: Parsing DICOM tags to an ArrayList<String>
body: <p>I am using dcm4chee2 to parse through tags with their <code>DicomInputStream</code> and <code>DicomObject</code>. I am then converting the metadata into a ArrayList of type String. However, when I use the toString() method to convert the tags from DicomObject to a String, I am noticing I am not getting a full list of DICOM tags, VR Codes, and Description. Can anyone tell me if there is another DicomObject method I should be using to get a full list rather than the toString()?</p>
  
  <p>Here is the code I currently have:</p>
  
  <pre><code>    ArrayList&lt;String&gt; dicomTags = new ArrayList&lt;String&gt;();
      DicomInputStream din = null;
      FileOutputStream fos = new FileOutputStream("dicomTagResults.txt");
      ObjectOutputStream oos = new ObjectOutputStream(fos);
      din = new DicomInputStream(new File(pathName));
      try {
          DicomObject dcmObj = din.readDicomObject();
          dicomTags.add(dcmObj.toString());
          for (String findMatch : dicomTags){
              System.out.println(findMatch.toString());
              oos.writeObject(dicomTags);
              oos.close();
          }
  
      }
      catch (IOException e)
      {
          e.printStackTrace();
          return;
      }
  </code></pre>