code: public void toPdf(PdfWriter writer, OutputStream os) throws IOException {
          os.write('<');
          os.write('<');
          // loop over all the object-pairs in the HashMap
          
         
          for (Map.Entry<PdfName, PdfObject> entry: hashMap.entrySet()){
          	PdfName key = entry.getKey();
          	PdfObject value = entry.getValue();
              key.toPdf(writer, os);
              int type = value.type();
              if (type != PdfObject.ARRAY && type != PdfObject.DICTIONARY && type != PdfObject.NAME && type != PdfObject.STRING) {
                  os.write(' ');
              }
              value.toPdf(writer, os);
          }
          os.write('>');
          os.write('>');
      }
docs: Writes the PDF representation of this <CODE>PdfDictionary</CODE> as an
  array of <CODE>byte</CODE> to the given <CODE>OutputStream</CODE>.
  
  @param writer for backwards compatibility
  @param os the <CODE>OutputStream</CODE> to write the bytes to.
  @throws IOException