code: public void printEntry(final Entry entry) throws IOException {
          if (entry != null) {
              final ByteStringBuffer buffer = new ByteStringBuffer();
              entry.toLDIF(buffer, 77);
              if (!first) {
                  ldifOutputStream.write(eol);
              } else {
                  first = false;
              }
              ldifOutputStream.write(buffer.toByteArray());
          }
      }
docs: Write the LDAP entry to the underlying output stream in LDIF format.
  
  @param entry The directory entry.
  @throws IOException If there was a problem writing to the underlying output stream.