netscape.ldap.util
Class LDAPWriter
java.lang.Object
netscape.ldap.util.LDAPWriter
- Serializable
public abstract class LDAPWriter
extends java.lang.Object
implements Serializable
Abstract class for outputting LDAP entries to a stream.
protected PrintWriter | m_pw
|
LDAPWriter(PrintWriter pw) - Constructs an
LDAPWriter object to output entries
to a stream.
|
m_pw
protected PrintWriter m_pw
LDAPWriter
public LDAPWriter(PrintWriter pw)
Constructs an LDAPWriter
object to output entries
to a stream.
pw
- output stream
getPrintableValue
protected String getPrintableValue(byte[] b)
printAttribute
protected void printAttribute(LDAPAttribute attr)
Print an attribute of an entry
attr
- the attribute to format to the output stream
printEntry
public void printEntry(LDAPEntry entry)
throws IOException
The main method of LDAPWriter. It calls printEntryIntro,
printAttribute, and printEntryEnd of derived classes.
entry
- an LDAPEntry to be formatted to the output
stream
printEntryEnd
protected void printEntryEnd(String dn)
Print epilogue to entry
dn
- the DN of the entry
printEntryStart
protected void printEntryStart(String dn)
Print prologue to entry
dn
- the DN of the entry
printSchema
public void printSchema(LDAPEntry entry)
throws IOException
Default schema writer - assumes an ordinary entry
entry
- an LDAPEntry containing schema to be formatted
to the output stream