|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ldap.util.LDIFWriter
public class LDIFWriter
LDAP Data Interchange Format (LDIF) is a file format used to represent the Directory entries. The data from the directory can be exported in this format and could be imported into another directory server. The Import and export of the directory data from an LDAP server can describe a set of changes that can be applied to data in a directory. This format is described in the Internet draft The LDAP Data Interchange Format (LDIF) - RFC-2849.
This class provides a set of methods to write an LDIF entry to the file.
Constructor Summary | |
---|---|
LDIFWriter() Default Constructor, Creates a Writer stream to the standard output. |
|
LDIFWriter(java.io.File fileObj) Creates a Writer stream to the specified file for writing the LDIF data. |
|
LDIFWriter(java.io.File fileObj, boolean wrap) Creates a Writer stream to the specified file for writing the LDIF data. |
|
LDIFWriter(java.io.OutputStream out) Creates a Writer Stream using the specified output stream object for writing the LDIF data. |
|
LDIFWriter(java.io.OutputStream out, boolean wrap) Creates a Writer Stream using the specified output stream object for writing the LDIF data. |
|
LDIFWriter(java.io.OutputStream out, java.lang.String enc) |
|
LDIFWriter(java.lang.String file) Creates a Writer stream to the specified file for writing the LDIF data. |
|
LDIFWriter(java.lang.String file, boolean wrap) Creates a Writer stream to the specified file for writing the LDIF data. |
Method Summary | |
---|---|
void |
close() Closes the stream. |
static void |
main(java.lang.String[] args) |
void |
newLine() Write a line separator. |
void |
setMaxLineLen(int maxLineLen) Use this method to set the maximum nubmer of chars that could be written in a line. |
void |
setWrap(boolean wrap) Use this method to specify should the wrapping of the attribute value done or not. |
void |
writeComment(java.lang.String comment) use this method to add a comment line to the LDIF file. |
void |
writeEntry(LDIFRecord ldifRecord) Use this method to write an LDIFRecord to a file. |
void |
writeEntry(java.util.Vector vEntry) Use this method to write an LDIF entry to the file. |
void |
writeEntryAsComment(LDIFRecord ldifRecord) Use this method to write an LDIFRecord to a file as a commented entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDIFWriter() throws java.io.IOException
java.io.IOException
- An I/O error has occurred.public LDIFWriter(java.lang.String file) throws java.io.IOException
file
- the name of the LDIF filejava.io.IOException
- An I/O error has occurred.public LDIFWriter(java.io.File fileObj) throws java.io.IOException
fileObj
- The file oject of the LDIF filejava.io.IOException
- An I/O error has occurred.public LDIFWriter(java.io.OutputStream out) throws java.io.IOException
out
- stream on to which the LDIF data needs to be written.java.io.IOException
- An I/O error has occurred.public LDIFWriter(java.io.OutputStream out, java.lang.String enc) throws java.io.IOException
java.io.IOException
public LDIFWriter(java.lang.String file, boolean wrap) throws java.io.IOException
file
- the name of the LDIF filewrap
- if true and the attribute value has more characters than max line length then the line will be wrappedjava.io.IOException
- An I/O error has occurred.public LDIFWriter(java.io.File fileObj, boolean wrap) throws java.io.IOException
fileObj
- The file oject of the LDIF filewrap
- if true and the attribute value has more characters than max line length then the line will be wrappedjava.io.IOException
- An I/O error has occurred.public LDIFWriter(java.io.OutputStream out, boolean wrap) throws java.io.IOException
out
- stream on to which the LDIF data needs to be written.wrap
- if true and the attribute value has more characters than max line length then the line will be wrappedjava.io.IOException
- An I/O error has occurred.Method Detail |
---|
public void newLine() throws java.io.IOException
java.io.IOException
- If an I/O error occurspublic void setMaxLineLen(int maxLineLen)
maxLineLen
- The maximum number of characters in a line.public void setWrap(boolean wrap)
wrap
- if true and the attribute value has more characters than max line length then the line will be wrappedpublic void writeEntry(LDIFRecord ldifRecord) throws java.io.IOException
LDIFRecord
to a file.ldifRecord
- a LDIFRecord object.java.io.IOException
- If an I/O error occurs.public void writeEntryAsComment(LDIFRecord ldifRecord) throws java.io.IOException
LDIFRecord
to a file as a commented entry.ldifRecord
- a LDIFRecord object.java.io.IOException
- If an I/O error occurs.public void writeEntry(java.util.Vector vEntry) throws java.io.IOException
vEntry
- A vector containing the Attribute Names:Values as elements.java.io.IOException
- If an I/O error occurs.public void writeComment(java.lang.String comment) throws java.io.IOException
comment
- the Comment string which is to be added to the LDIF filejava.io.IOException
- If an I/O error occurs.public void close() throws java.io.IOException
java.io.IOException
- If an error occurs.public static void main(java.lang.String[] args)
|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |