Class Stream


  • public class Stream
    extends java.lang.Object
    Since:
    2.0
    • Field Detail

      • READ_WRITE_MODE

        public static final int READ_WRITE_MODE
        Stream definition supports reading and writing
        See Also:
        Constant Field Values
      • READ_ONLY_MODE

        public static final int READ_ONLY_MODE
        Stream definition supports reading only
        See Also:
        Constant Field Values
      • WRITE_ONLY_MODE

        public static final int WRITE_ONLY_MODE
        Stream definition supports writing only
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • init

        public void init()
      • getName

        public java.lang.String getName()
        Returns the name of this stream.
        Returns:
        the stream name
      • createBeanReader

        public BeanReader createBeanReader​(java.io.Reader in,
                                           java.util.Locale locale)
        Creates a new BeanReader for reading from the given input stream.
        Parameters:
        in - the input stream to read from
        locale - the locale to use for rendering error messages
        Returns:
        the new BeanReader
      • createUnmarshaller

        public Unmarshaller createUnmarshaller​(java.util.Locale locale)
        Creates a new Unmarshaller.
        Parameters:
        locale - the Locale to use for rendering error messages
        Returns:
        the new Unmarshaller
      • createBeanWriter

        public BeanWriter createBeanWriter​(java.io.Writer out)
        Creates a new BeanWriter for writing to the given output stream.
        Parameters:
        out - the output stream to write to
        Returns:
        the new BeanWriter
      • getMode

        public int getMode()
        Returns the allowed mode of operation for this stream configuration.
        Returns:
        READ_WRITE_MODE if reading and writing from a stream is allowed, READ_ONLY_MODE if only reading is allowed, WRITE_ONLY_MODE if only writing is allowed
      • setMode

        public void setMode​(int mode)
        Sets the allowed mode of operation for this stream configuration.
        Parameters:
        mode - READ_WRITE_MODE if reading and writing from a stream is allowed, READ_ONLY_MODE if only reading is allowed, WRITE_ONLY_MODE if only writing is allowed
      • getLayout

        public Selector getLayout()
      • setLayout

        public void setLayout​(Selector layout)
      • setFormat

        public void setFormat​(StreamFormat format)
      • setMessageFactory

        public void setMessageFactory​(MessageFactory messageFactory)
      • isIgnoreUnidentifiedRecords

        public boolean isIgnoreUnidentifiedRecords()
        Returns whether to ignore unidentified records. Defaults to false.
        Returns:
        true to ignore unidentified records, false otherwise
        Since:
        2.0.4
      • setIgnoreUnidentifiedRecords

        public void setIgnoreUnidentifiedRecords​(boolean ignoreUnidentifiedRecords)
        Sets whether to ignore unidentified records. Defaults to false.
        Parameters:
        ignoreUnidentifiedRecords - true to ignore unidentified records, false otherwise
        Since:
        2.0.4