Class LDAPResultWriter

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected LDAPResultWriter​(java.io.OutputStream outputStream)
      Creates a new LDAP result writer that will write to the provided output stream.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void flush()
      Flushes any buffered output.
      protected java.io.PrintStream getPrintStream()
      Retrieves the print stream that may be used to write output.
      protected void print​(java.lang.String string)
      Writes the provided string to the associated print stream without a subsequent newline.
      protected void println()
      Writes a blank line to the associated print stream.
      protected void println​(java.lang.String string)
      Writes the provided string to the associated print stream with a subsequent newline.
      void updateOutputStream​(java.io.OutputStream outputStream)
      Updates the output stream to which output will be written.
      abstract void writeComment​(java.lang.String comment)
      Writes the provided comment to the output.
      abstract void writeHeader()
      Formats and writes a header that describes the way in which the data will be formatted.
      abstract void writeResult​(LDAPResult result)
      Formats and writes the provided LDAP result.
      abstract void writeSearchResultEntry​(SearchResultEntry entry)
      Formats and writes the provided search result entry.
      abstract void writeSearchResultReference​(SearchResultReference ref)
      Formats and writes the provided search result reference.
      abstract void writeUnsolicitedNotification​(LDAPConnection connection, ExtendedResult notification)
      Formats and writes the provided unsolicited notification.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LDAPResultWriter

        protected LDAPResultWriter​(@NotNull
                                   java.io.OutputStream outputStream)
        Creates a new LDAP result writer that will write to the provided output stream.
        Parameters:
        outputStream - The output stream to which the output will be written. It must not be null.
    • Method Detail

      • updateOutputStream

        public final void updateOutputStream​(@NotNull
                                             java.io.OutputStream outputStream)
        Updates the output stream to which output will be written.
        Parameters:
        outputStream - The output stream to which the output will be written. It must not be null.
      • println

        protected void println()
        Writes a blank line to the associated print stream.
      • print

        protected void print​(@NotNull
                             java.lang.String string)
        Writes the provided string to the associated print stream without a subsequent newline.
        Parameters:
        string - The string to be written. It must not be null.
      • println

        protected void println​(@NotNull
                               java.lang.String string)
        Writes the provided string to the associated print stream with a subsequent newline.
        Parameters:
        string - The string to be written. It must not be null.
      • getPrintStream

        @NotNull
        protected final java.io.PrintStream getPrintStream()
        Retrieves the print stream that may be used to write output.
        Returns:
        The print stream that may be used to write output.
      • flush

        public final void flush()
        Flushes any buffered output.
      • writeComment

        public abstract void writeComment​(@NotNull
                                          java.lang.String comment)
        Writes the provided comment to the output.
        Parameters:
        comment - The comment to be written. It must not be null.
      • writeHeader

        public abstract void writeHeader()
        Formats and writes a header that describes the way in which the data will be formatted. This will be displayed at the beginning of the output (including at the beginning of each file, if output should be spread across multiple files).
      • writeResult

        public abstract void writeResult​(@NotNull
                                         LDAPResult result)
        Formats and writes the provided LDAP result.
        Parameters:
        result - The LDAP result to be processed. It may or may not be a search result.
      • writeUnsolicitedNotification

        public abstract void writeUnsolicitedNotification​(@NotNull
                                                          LDAPConnection connection,
                                                          @NotNull
                                                          ExtendedResult notification)
        Formats and writes the provided unsolicited notification.
        Parameters:
        connection - The connection on which the unsolicited notification was received.
        notification - The unsolicited notification that was received.