Package netscape.ldap.util
Class LDAPWriter
- java.lang.Object
-
- netscape.ldap.util.LDAPWriter
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
DSMLWriter,LDIFWriter
public abstract class LDAPWriter extends java.lang.Object implements java.io.SerializableAbstract class for outputting LDAP entries to a stream.- Version:
- 1.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.PrintWriterm_pw
-
Constructor Summary
Constructors Constructor Description LDAPWriter(java.io.PrintWriter pw)Constructs anLDAPWriterobject to output entries to a stream.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetPrintableValue(byte[] b)protected abstract voidprintAttribute(LDAPAttribute attr)Print an attribute of an entryvoidprintEntry(LDAPEntry entry)The main method of LDAPWriter.protected abstract voidprintEntryEnd(java.lang.String dn)Print epilogue to entryprotected abstract voidprintEntryStart(java.lang.String dn)Print prologue to entryvoidprintSchema(LDAPEntry entry)Default schema writer - assumes an ordinary entry
-
-
-
Method Detail
-
printEntry
public void printEntry(LDAPEntry entry) throws java.io.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:
java.io.IOException
-
printSchema
public void printSchema(LDAPEntry entry) throws java.io.IOException
Default schema writer - assumes an ordinary entry- Parameters:
entry- an LDAPEntry containing schema to be formatted to the output stream- Throws:
java.io.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(java.lang.String dn)
Print prologue to entry- Parameters:
dn- the DN of the entry
-
printEntryEnd
protected abstract void printEntryEnd(java.lang.String dn)
Print epilogue to entry- Parameters:
dn- the DN of the entry
-
getPrintableValue
protected java.lang.String getPrintableValue(byte[] b)
-
-