public interface StringDataFormat extends DataFormat
DataFormat that reads and writes data from/to a string.| Modifier and Type | Method and Description |
|---|---|
DataContainer |
read(String input)
Creates a new
DataContainer from the contents of the given
String. |
DataContainer |
readFrom(Reader input)
Creates a new
DataContainer from the contents of the given
Reader. |
String |
write(DataView data)
|
void |
writeTo(Writer output,
DataView data)
|
readFrom, writeTogetId, getNameDataContainer read(String input) throws InvalidDataException, IOException
DataContainer from the contents of the given
String.input - The string to parseInvalidDataException - If the data in the string was not a
supported formatIOException - If there was an error reading from the stringDataContainer readFrom(Reader input) throws InvalidDataException, IOException
DataContainer from the contents of the given
Reader.input - The readerInvalidDataException - If the data in the reader was not a
supported formatIOException - If there was an error reading from the readerString write(DataView data) throws IOException
data - The DataView to writeIOException - If there was an error serializing the datavoid writeTo(Writer output, DataView data) throws IOException
output - The writer to write the data todata - The DataView to write to the writerIOException - If there was an error writing to the writer