List of usage examples for javax.naming.ldap BasicControl BasicControl
public BasicControl(String id, boolean criticality, byte[] value)
From source file:org.apache.directory.studio.ldapbrowser.core.jobs.ImportLdifRunnable.java
/** * Gets the controls.//from ww w . j a v a 2 s. com * * @param record the LDIF record * * @return the controls */ private static Control[] getControls(LdifRecord record) { Control[] controls = null; if (record instanceof LdifChangeRecord) { LdifChangeRecord changeRecord = (LdifChangeRecord) record; LdifControlLine[] controlLines = changeRecord.getControls(); controls = new Control[controlLines.length]; for (int i = 0; i < controlLines.length; i++) { LdifControlLine line = controlLines[i]; controls[i] = new BasicControl(line.getUnfoldedOid(), line.isCritical(), line.getControlValueAsBinary()); } } return controls; }