Interface StringDataFormat

    • Method Detail

      • read

        DataContainer read​(java.lang.String input)
                    throws InvalidDataException,
                           java.io.IOException
        Creates a new DataContainer from the contents of the given String.
        Parameters:
        input - The string to parse
        Returns:
        A data container representing the parsed contents of the string
        Throws:
        InvalidDataException - If the data in the string was not a supported format
        java.io.IOException - If there was an error reading from the string
      • readFrom

        DataContainer readFrom​(java.io.Reader input)
                        throws InvalidDataException,
                               java.io.IOException
        Creates a new DataContainer from the contents of the given Reader.
        Parameters:
        input - The reader
        Returns:
        A data container representing the parsed contents of the reader
        Throws:
        InvalidDataException - If the data in the reader was not a supported format
        java.io.IOException - If there was an error reading from the reader
      • write

        java.lang.String write​(DataView data)
                        throws java.io.IOException
        Serializes the given DataView to a String using the format specified by this DataFormat.
        Parameters:
        data - The DataView to write
        Returns:
        The serialized data view
        Throws:
        java.io.IOException - If there was an error serializing the data
      • writeTo

        void writeTo​(java.io.Writer output,
                     DataView data)
              throws java.io.IOException
        Writes the given DataView to the given Writer using the format specified by this DataFormat.
        Parameters:
        output - The writer to write the data to
        data - The DataView to write to the writer
        Throws:
        java.io.IOException - If there was an error writing to the writer