Class PagedResultsControl


  • public class PagedResultsControl
    extends Control
    This class represents a paged results control value as defined in RFC 2696. The searchControlValue is an OCTET STRING wrapping the BER-encoded version of the following SEQUENCE:
     realSearchControlValue ::= SEQUENCE {
             size            INTEGER (0..maxInt),
                                     -- requested page size from client
                                     -- result set size estimate from server
             cookie          OCTET STRING
     }
     
    • Constructor Detail

      • PagedResultsControl

        public PagedResultsControl​(boolean isCritical,
                                   int size,
                                   ByteString cookie)
        Creates a new paged results control with the specified information.
        Parameters:
        isCritical - Indicates whether this control should be considered critical in processing the request.
        size - The size element.
        cookie - The cookie element.
    • Method Detail

      • writeValue

        public void writeValue​(ASN1Writer writer)
                        throws IOException
        Description copied from class: Control
        Writes this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.
        Specified by:
        writeValue in class Control
        Parameters:
        writer - The ASN.1 writer to use.
        Throws:
        IOException - If a problem occurs while writing to the stream.
      • getSize

        public int getSize()
        Get the control value size element, which is either the requested page size from the client, or the result set size estimate from the server.
        Returns:
        The control value size element.
      • getCookie

        public ByteString getCookie()
        Get the control value cookie element.
        Returns:
        The control value cookie element.