Class InputStreamDatabaseConnection

  • All Implemented Interfaces:
    DatabaseConnection, java.lang.AutoCloseable
    Direct Known Subclasses:
    FileBasedDatabaseConnection

    @Title("Input-Stream based database connection")
    @Description("Parse an input stream such as STDIN into a database.")
    public class InputStreamDatabaseConnection
    extends AbstractDatabaseConnection
    implements java.lang.AutoCloseable
    Database connection expecting input from an input stream such as stdin.
    Since:
    0.1
    Author:
    Arthur Zimek
    • Field Detail

      • LOG

        private static final Logging LOG
        The logger for this class.
      • parser

        Parser parser
        Holds the instance of the parser.
      • in

        java.util.function.Supplier<java.io.InputStream> in
        The input stream to parse from.
      • ins

        java.io.InputStream ins
        The stream that we are processing.
    • Constructor Detail

      • InputStreamDatabaseConnection

        public InputStreamDatabaseConnection​(java.util.function.Supplier<java.io.InputStream> in,
                                             java.util.List<? extends ObjectFilter> filters,
                                             Parser parser)
        Constructor.
        Parameters:
        in - Input stream opener
        filters - Filters to use
        parser - the parser to provide a database
      • InputStreamDatabaseConnection

        public InputStreamDatabaseConnection​(java.io.InputStream ins,
                                             java.util.List<? extends ObjectFilter> filters,
                                             Parser parser)
        Constructor.
        Parameters:
        ins - Input stream to process
        filters - Filters to use
        parser - the parser to provide a database