- /**
- * 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
- * @param offset
- * the offset at which to start reading the data (we ignore
- * anything that goes before that offset)
- *
- * @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
- * @throws IOException
- * if the content cannot be read (for instance, corrupt data)
- */
- private Importer read(byte[] data, int offset) throws NoSuchFieldException,
- NoSuchMethodException, ClassNotFoundException, IOException {
-
- int dataStart = offset;
- while (dataStart < data.length) {
- String id = "";
- if (data.length - dataStart >= SIZE_ID) {
- id = new String(data, dataStart, SIZE_ID);
- }