Class Streamer
- java.lang.Object
-
- com.ibm.fhir.database.utils.streams.Streamer
-
public class Streamer extends java.lang.Object
Simple implementation taking a JDBC ResultSet and rendering it using the Java Streams API.
The JDBC API is really starting to show its age here
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Streamer.Row
Inner class representing each row of theResultSet
as it flows down the stream.
-
Constructor Summary
Constructors Constructor Description Streamer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.stream.Stream<Streamer.Row>
wrap(java.sql.ResultSet rs)
Wrap the JDBCResultSet
as a stream object.
-
-
-
Method Detail
-
wrap
public java.util.stream.Stream<Streamer.Row> wrap(java.sql.ResultSet rs) throws java.sql.SQLException
Wrap the JDBCResultSet
as a stream object. Note that the stream has to be consumed within the boundaries of the statement execution- Parameters:
rs
-- Returns:
- Throws:
java.sql.SQLException
-
-