Class LDAPWriter

java.lang.Object
netscape.ldap.util.LDAPWriter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DSMLWriter, LDIFWriter

public abstract class LDAPWriter extends Object implements Serializable
Abstract class for outputting LDAP entries to a stream.
Version:
1.0
See Also:
  • Field Details

  • Constructor Details

    • LDAPWriter

      public LDAPWriter(PrintWriter pw)
      Constructs an LDAPWriter object to output entries to a stream.
      Parameters:
      pw - output stream
  • Method Details

    • printEntry

      public void printEntry(LDAPEntry entry) throws IOException
      The main method of LDAPWriter. It calls printEntryIntro, printAttribute, and printEntryEnd of derived classes.
      Parameters:
      entry - an LDAPEntry to be formatted to the output stream
      Throws:
      IOException
    • printSchema

      public void printSchema(LDAPEntry entry) throws IOException
      Default schema writer - assumes an ordinary entry
      Parameters:
      entry - an LDAPEntry containing schema to be formatted to the output stream
      Throws:
      IOException
    • printAttribute

      protected abstract void printAttribute(LDAPAttribute attr)
      Print an attribute of an entry
      Parameters:
      attr - the attribute to format to the output stream
    • printEntryStart

      protected abstract void printEntryStart(String dn)
      Print prologue to entry
      Parameters:
      dn - the DN of the entry
    • printEntryEnd

      protected abstract void printEntryEnd(String dn)
      Print epilogue to entry
      Parameters:
      dn - the DN of the entry
    • getPrintableValue

      protected String getPrintableValue(byte[] b)