use of com.unboundid.asn1.ASN1Buffer in project ldapsdk by pingidentity.
the class Attribute method writeTo.
/**
* Writes an ASN.1-encoded representation of this attribute to the provided
* ASN.1 buffer.
*
* @param buffer The ASN.1 buffer to which the encoded representation should
* be written.
*/
public void writeTo(@NotNull final ASN1Buffer buffer) {
final ASN1BufferSequence attrSequence = buffer.beginSequence();
buffer.addOctetString(name);
final ASN1BufferSet valueSet = buffer.beginSet();
for (final ASN1OctetString value : values) {
buffer.addElement(value);
}
valueSet.end();
attrSequence.end();
}
use of com.unboundid.asn1.ASN1Buffer in project ldapsdk by pingidentity.
the class ModifyDNRequestProtocolOp method writeTo.
/**
* {@inheritDoc}
*/
@Override()
public void writeTo(@NotNull final ASN1Buffer buffer) {
final ASN1BufferSequence opSequence = buffer.beginSequence(LDAPMessage.PROTOCOL_OP_TYPE_MODIFY_DN_REQUEST);
buffer.addOctetString(dn);
buffer.addOctetString(newRDN);
buffer.addBoolean(deleteOldRDN);
if (newSuperiorDN != null) {
buffer.addOctetString(TYPE_NEW_SUPERIOR, newSuperiorDN);
}
opSequence.end();
}
use of com.unboundid.asn1.ASN1Buffer in project ldapsdk by pingidentity.
the class SearchRequestProtocolOp method writeTo.
/**
* {@inheritDoc}
*/
@Override()
public void writeTo(@NotNull final ASN1Buffer buffer) {
final ASN1BufferSequence opSequence = buffer.beginSequence(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_REQUEST);
buffer.addOctetString(baseDN);
buffer.addEnumerated(scope.intValue());
buffer.addEnumerated(derefPolicy.intValue());
buffer.addInteger(sizeLimit);
buffer.addInteger(timeLimit);
buffer.addBoolean(typesOnly);
filter.writeTo(buffer);
final ASN1BufferSequence attrSequence = buffer.beginSequence();
for (final String s : attributes) {
buffer.addOctetString(s);
}
attrSequence.end();
opSequence.end();
}
use of com.unboundid.asn1.ASN1Buffer in project ldapsdk by pingidentity.
the class SearchResultEntryProtocolOp method writeTo.
/**
* {@inheritDoc}
*/
@Override()
public void writeTo(@NotNull final ASN1Buffer buffer) {
final ASN1BufferSequence opSequence = buffer.beginSequence(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_RESULT_ENTRY);
buffer.addOctetString(dn);
final ASN1BufferSequence attrSequence = buffer.beginSequence();
for (final Attribute a : attributes) {
a.writeTo(buffer);
}
attrSequence.end();
opSequence.end();
}
use of com.unboundid.asn1.ASN1Buffer in project ldapsdk by pingidentity.
the class SearchResultReferenceProtocolOp method writeTo.
/**
* {@inheritDoc}
*/
@Override()
public void writeTo(@NotNull final ASN1Buffer buffer) {
final ASN1BufferSequence opSequence = buffer.beginSequence(LDAPMessage.PROTOCOL_OP_TYPE_SEARCH_RESULT_REFERENCE);
for (final String s : referralURLs) {
buffer.addOctetString(s);
}
opSequence.end();
}
Aggregations