Package org.utplsql.api.outputBuffer
Interface OutputBuffer
-
public interface OutputBuffer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>fetchAll(Connection conn)Get all lines from output buffer and return it as a list of strings.voidfetchAvailable(Connection conn, Consumer<String> onLineFetched)Print the lines as soon as they are produced and call the callback passing the new line.ReportergetReporter()voidprintAvailable(Connection conn, PrintStream ps)Print the lines as soon as they are produced and write to a PrintStream.voidprintAvailable(Connection conn, List<PrintStream> printStreams)Print the lines as soon as they are produced and write to a list of PrintStreams.OutputBuffersetFetchSize(int fetchSize)Override the fetchSize of the OutputBuffer
-
-
-
Method Detail
-
getReporter
Reporter getReporter()
-
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 connectionps- 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 connectionprintStreams- 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 connectiononLineFetched- 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
-
-