Class DefaultFlowWriter

    • Field Detail

      • m_Encoding

        protected BaseCharset m_Encoding
        the encoding to use.
      • m_UseCompact

        protected boolean m_UseCompact
        whether to use compact format.
    • Constructor Detail

      • DefaultFlowWriter

        public DefaultFlowWriter()
    • Method Detail

      • setEncoding

        public void setEncoding​(BaseCharset value)
        Sets the encoding to use.
        Specified by:
        setEncoding in interface EncodingSupporter
        Parameters:
        value - the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • getEncoding

        public BaseCharset getEncoding()
        Returns the encoding to use.
        Specified by:
        getEncoding in interface EncodingSupporter
        Returns:
        the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • encodingTipText

        public String encodingTipText()
        Returns the tip text for this property.
        Specified by:
        encodingTipText in interface EncodingSupporter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getDefaultUseCompact

        protected boolean getDefaultUseCompact()
        Returns the default missing value.
        Returns:
        the default for missing values
      • setUseCompact

        public void setUseCompact​(boolean value)
        Sets whether to use compact format.
        Parameters:
        value - true if to use compact format
      • getUseCompact

        public boolean getUseCompact()
        Returns whether to use compact format.
        Returns:
        true if compact format used
      • useCompactTipText

        public String useCompactTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • toCompactString

        protected String toCompactString​(List nested)
        Turns the nested format into a string.
        Parameters:
        nested - the nested format to convert
        Returns:
        the generated string
      • toNestedString

        protected String toNestedString​(List nested)
        Turns the nested format into a string.
        Parameters:
        nested - the nested format to convert
        Returns:
        the generated string
      • doWrite

        protected boolean doWrite​(List content,
                                  File file)
        Writes the given content to the specified file.
        Overrides:
        doWrite in class AbstractNestedFlowWriter
        Parameters:
        content - the content to write
        file - the file to write to
        Returns:
        true if successfully written
      • doWrite

        protected boolean doWrite​(List content,
                                  Writer writer)
        Performs the actual writing. The caller must ensure that the writer gets closed.
        Overrides:
        doWrite in class AbstractNestedFlowWriter
        Parameters:
        content - the content to write
        writer - the writer to write the content to
        Returns:
        true if successfully written
      • doWrite

        protected boolean doWrite​(List content,
                                  OutputStream out)
        Performs the actual writing. The caller must ensure that the output stream gets closed.
        Overrides:
        doWrite in class AbstractNestedFlowWriter
        Parameters:
        content - the content to write
        out - the output stream to write the content to
        Returns:
        true if successfully written
      • toCompactString

        protected String toCompactString​(Actor actor)
        Turns the actor into a compact string.
        Parameters:
        actor - the actor to convert
        Returns:
        the
      • doWrite

        protected boolean doWrite​(Actor content,
                                  File file)
        Writes the given content to the specified file.
        Overrides:
        doWrite in class AbstractFlowWriter
        Parameters:
        content - the content to write
        file - the file to write to
        Returns:
        true if successfully written
      • doWrite

        protected boolean doWrite​(Actor content,
                                  Writer writer)
        Performs the actual writing. The caller must ensure that the writer gets closed.
        Overrides:
        doWrite in class AbstractFlowWriter
        Parameters:
        content - the content to write
        writer - the writer to write the content to
        Returns:
        true if successfully written
      • doWrite

        protected boolean doWrite​(Actor content,
                                  OutputStream out)
        Performs the actual writing. The caller must ensure that the output stream gets closed.
        Overrides:
        doWrite in class AbstractFlowWriter
        Parameters:
        content - the content to write
        out - the output stream to write the content to
        Returns:
        true if successfully written
      • getCorrespondingReader

        public FlowReader getCorrespondingReader()
        Returns the corresponding reader, if available.
        Specified by:
        getCorrespondingReader in interface FlowWriter
        Returns:
        the reader, null if none available