congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
LDIFWriter.writeLine
Code IndexAdd Tabnine to your IDE (free)

How to use
writeLine
method
in
com.novell.ldap.util.LDIFWriter

Best Java code snippets using com.novell.ldap.util.LDIFWriter.writeLine (Showing top 8 results out of 315)

origin: com.novell.ldap/jldap

/**
 * Write the DN to the outputStream.  If the DN characters are unsafe,
 * the DN is encoded.
 *
 * @param dn the DN to write
 */
private void writeDN(String dn)
      throws IOException
{
  writeLine(Base64.isLDIFSafe(dn)? "dn: "+dn: "dn:: "+ Base64.encode(dn));
  return;
}
origin: com.novell.ldap/jldap

/**
 * Write attribute name and value into outputStream.
 *
 * <p>Check if attrVal starts with NUL, LF, CR, ' ', ':', or '<'
 * or contains any NUL, LF, or CR, and then write it out</p>
 */
private void writeAttribute(String attrName, String attrVal)
      throws IOException
{
  if (attrVal != null) {
    writeLine( Base64.isLDIFSafe(attrVal)?
      attrName + ": "  + attrVal :
      attrName + ":: " + Base64.encode(attrVal) );
  }
  return;
}
origin: com.novell.ldap/jldap

/**
 * Write attribute name and value into outputStream.
 *
 * <p>Check if attribute value contains NON-SAFE-INIT-CHAR or
 * NON-SAFE-CHAR. if it does, it needs to be base64 encoded and then
 * write it out</p>
 */
private void writeAttribute(String attrName, byte[] attrVal)
      throws IOException
{
  if (attrVal != null) {
    writeLine( (Base64.isLDIFSafe(attrVal) && isPrintable(attrVal))?
      attrName + ": " + new String(attrVal, "UTF-8"):
      attrName + ":: " + Base64.encode(attrVal) );
  }
  return;
}
origin: com.novell.ldap/jldap

/**
 * Used to generate LDIF change/delete record lines.
 *
 * <p>Turn entry DN, controls
 * and change type into LDIF change/delete record fields and then turn
 * record fields into LDIF moddn record lines</p>
 *
 * @param dn    String object representing entry DN
 * @param ctrls LDAPControl array object
 *
 * @see LDAPControl
 */
private void writeDeleteRequest( String dn,
                LDAPControl[] ctrls )
      throws IOException
{
  // write dn line(s)
  writeDN(dn);
  // write control line(s)
  if ( ctrls != null ) {
    writeControls( ctrls );
  }
  // write change type
  writeLine("changetype: delete");
  return;
}
origin: com.novell.ldap/jldap

writeLine("changetype: moddn");
writeLine( Base64.isLDIFSafe(newRDN)?
  "newrdn: "  + newRDN:
  "newrdn:: " + Base64.encode(newRDN));
writeLine("deleteoldrdn:" + deleteOldRDN);
  writeLine( Base64.isLDIFSafe(newSuperior)?
    "newsuperior: "  + newSuperior:
    "newsuperior:: " +  Base64.encode(newSuperior));
origin: com.novell.ldap/jldap

writeLine("changetype: modify");
      writeLine("add: "+ attrName);
      break;
    case LDAPModification.DELETE:
      writeLine("delete: "+ attrName);
      break;
    case LDAPModification.REPLACE:
      writeLine("replace: "+ attrName);
      break;
    default:
  writeLine("-");
origin: com.novell.ldap/jldap

/**
 * Write control line(s).
 *
 * @param ctrls LDAPControl array object
 */
private void writeControls(LDAPControl[] ctrls)
      throws IOException
{
  for ( int i = 0; i < ctrls.length; i++ ) {
    // get control value
    byte[] cVal = ctrls[i].getValue();
    // write control value
    writeLine( (cVal != null && cVal.length > 0)?
      "control: " + ctrls[i].getID() + " " + ctrls[i].isCritical()
            + ":: " + Base64.encode(cVal):
      "control: " + ctrls[i].getID() + " " + ctrls[i].isCritical() );
  }
  return;
}
origin: com.novell.ldap/jldap

writeLine("changetype: add");
com.novell.ldap.utilLDIFWriterwriteLine

Javadoc

Write a line into the OutputStream.

If the line contains more than 80 chars, it will be splited into multiple lines each of which starts with a space ( ASCII ' ') except the first one.

Popular methods of LDIFWriter

  • getVersion
    Gets the version of the LDIF data associated with the input stream
  • isPrintable
    Check if the input byte array object is safe to make a String.Check if the input byte array contains
  • isRequest
    Returns true if request data ist associated with the input stream, or false if content data.
  • writeAddRequest
    Used to generate LDIF content record or LDIF change/add record lines.Turn LDAPEntry object and LDAPC
  • writeAttribute
    Write attribute name and value into outputStream.Check if attribute value contains NON-SAFE-INIT-CHA
  • writeComments
    Write a comment line into the LDIF OutputStream. an '#' char is added to the front of each line to i
  • writeControls
    Write control line(s).
  • writeDN
    Write the DN to the outputStream. If the DN characters are unsafe, the DN is encoded.
  • writeDeleteRequest
    Used to generate LDIF change/delete record lines.Turn entry DN, controls and change type into LDIF c
  • writeEntry
    Write an LDAP record into LDIF file as LDAPContent data.You are not allowed to mix request data and
  • writeModifyDNRequest
    Used to generate LDIF change/moddn record lines.Turn entry DN and moddn information into LDIF change
  • writeModifyRequest
    Used to generate LDIF change/modify record lines.Turn entry DN, LDAPModification[] object, and LDAPC
  • writeModifyDNRequest,
  • writeModifyRequest,
  • writeVersionLine

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • String (java.lang)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now