this.lineStream = new PlainTextByLineStream(in, this.encoding);
}
public StringList read() throws IOException {
String line = lineStream.read();
StringList name = null;
if ((line != null) &&
(!StringUtil.isEmpty(line))) {
String name2;
// find the location of the name separator in the line of data.
int pos = line.indexOf(' ');
if ((pos != -1)) {
String parsed = line.substring(0, pos);
// the data is in ALL CAPS ... so the easiest way is to convert
// back to standard mixed case.
if ((parsed.length() > 2) &&
(parsed.startsWith("MC"))) {
name2 = parsed.substring(0,1).toUpperCase(locale) +
parsed.substring(1,2).toLowerCase(locale) +
parsed.substring(2,3).toUpperCase(locale) +
parsed.substring(3).toLowerCase(locale);
} else {
name2 = parsed.substring(0,1).toUpperCase(locale) +
parsed.substring(1).toLowerCase(locale);
}
name = new StringList(new String[]{name2});
}
}
return name;
}