- public Importer readLine(String line) {
- try {
- processLine(line);
- } catch (Exception e) {
- throw new IllegalArgumentException(e);
- }
- return this;
- }
+ /**
+ * Read some data into this {@link Importer}: it can be the full serialised
+ * content, or a number of lines of it (any given line <b>MUST</b> be
+ * complete though) and accumulate it with the already present data.
+ *
+ * @param data
+ * the data to parse
+ *
+ * @return itself so it can be chained
+ *
+ * @throws NoSuchFieldException
+ * if the serialised data contains information about a field
+ * which does actually not exist in the class we know of
+ * @throws NoSuchMethodException
+ * if a class described in the serialised data cannot be created
+ * because it is not compatible with this code
+ * @throws ClassNotFoundException
+ * if a class described in the serialised data cannot be found
+ */
+ public Importer read(String data) throws NoSuchFieldException,
+ NoSuchMethodException, ClassNotFoundException {