Class StreamBuilder

    • Constructor Detail

      • StreamBuilder

        public StreamBuilder​(java.lang.String name)
        Constructs a new StreamBuilder.
        Parameters:
        name - the stream name
      • StreamBuilder

        public StreamBuilder​(java.lang.String name,
                             java.lang.String format)
        Constructs a new StreamBuilder.
        Parameters:
        name - the stream name
        format - the stream format
    • Method Detail

      • format

        public StreamBuilder format​(java.lang.String format)
        Sets the stream format.
        Parameters:
        format - the format (e.g. csv, delimited, fixedlength, xml)
        Returns:
        this
      • parser

        public StreamBuilder parser​(RecordParserFactory parser)
        Sets the parser for this stream.
        Parameters:
        parser - the stream parser factory
        Returns:
        this
      • addTypeHandler

        public StreamBuilder addTypeHandler​(java.lang.String name,
                                            java.lang.Class<?> type,
                                            TypeHandler handler)
        Adds a type handler
        Parameters:
        name - the name of the type handler
        type - the class parsed by the type handler
        handler - the type handler
        Returns:
        this
      • addTypeHandler

        public StreamBuilder addTypeHandler​(java.lang.String name,
                                            TypeHandler handler)
        Adds a type handler
        Parameters:
        name - the name of the type handler
        handler - the type handler
        Returns:
        this
      • addTypeHandler

        public StreamBuilder addTypeHandler​(java.lang.Class<?> type,
                                            TypeHandler handler)
        Adds a type handler
        Parameters:
        type - the class parsed by the type handler
        handler - the type handler
        Returns:
        this
      • readOnly

        public StreamBuilder readOnly()
        Indicates this stream configuration is only used for unmarshalling.
        Returns:
        this
      • writeOnly

        public StreamBuilder writeOnly()
        Indicates this stream configuration is only used for marshalling.
        Returns:
        this
      • resourceBundle

        public StreamBuilder resourceBundle​(java.lang.String name)
      • strict

        public StreamBuilder strict()
        Indicates this stream should be strictly validated.
        Returns:
        this
      • ignoreUnidentifiedRecords

        public StreamBuilder ignoreUnidentifiedRecords()
        Indicates unidentified records should be ignored during unmarshalling.
        Returns:
        this
      • build

        public StreamConfig build()
        Builds the stream configuration.
        Returns:
        the stream configuration