Interface OutputBuffer


  • public interface OutputBuffer
    • Method Detail

      • setFetchSize

        OutputBuffer setFetchSize​(int fetchSize)
        Override the fetchSize of the OutputBuffer
        Parameters:
        fetchSize - the ResultSet fetch-size.
        Returns:
        this Output-Buffer
      • printAvailable

        void printAvailable​(Connection conn,
                            PrintStream ps)
                     throws SQLException
        Print the lines as soon as they are produced and write to a PrintStream.
        Parameters:
        conn - DB connection
        ps - the PrintStream to be used, e.g: System.out
        Throws:
        SQLException - any sql errors
      • printAvailable

        void printAvailable​(Connection conn,
                            List<PrintStream> printStreams)
                     throws SQLException
        Print the lines as soon as they are produced and write to a list of PrintStreams.
        Parameters:
        conn - DB connection
        printStreams - the PrintStream list to be used, e.g: System.out, new PrintStream(new FileOutputStream)
        Throws:
        SQLException - any sql errors
      • fetchAvailable

        void fetchAvailable​(Connection conn,
                            Consumer<String> onLineFetched)
                     throws SQLException
        Print the lines as soon as they are produced and call the callback passing the new line.
        Parameters:
        conn - DB connection
        onLineFetched - the callback to be called
        Throws:
        SQLException - any sql errors
      • fetchAll

        List<String> fetchAll​(Connection conn)
                       throws SQLException
        Get all lines from output buffer and return it as a list of strings.
        Parameters:
        conn - DB connection
        Returns:
        the lines
        Throws:
        SQLException - any sql errors