+ String nextRawLine = null;
+ if (lines.hasNext()) {
+ nextRawLine = lines.next();
+ while (lines.hasNext() && isContinuation(nextRawLine)) {
+ // BAD INPUT FILE. IGNORE.
+ System.err
+ .println("VCARD Parser warning: CONTINUATION line seen before any data line");
+ nextRawLine = lines.next();
+ }
+ }
+
+ while (nextRawLine != null) {
+ StringBuilder rawLine = new StringBuilder(nextRawLine.trim());
+ if (lines.hasNext())
+ nextRawLine = lines.next();
+ else
+ nextRawLine = null;
+
+ while (isContinuation(nextRawLine)) {
+ rawLine.append(nextRawLine.trim());
+ if (lines.hasNext())
+ nextRawLine = lines.next();
+ else
+ nextRawLine = null;
+ }
+
+ String line = rawLine.toString();