if (is.read() != '#')
return new String[] { path };
else if (is.read() != '!')
return new String[] { path };
CharBuffer cb = CharBuffer.allocate();
ArrayList<String> list = new ArrayList<String>();
ch = is.read();
while ((ch >= 0 && ch != '\r' && ch != '\n')) {
for (; ch == ' ' || ch == '\t'; ch = is.read()) {
}
if (ch < 0 || ch == '\r' || ch == '\n') {
if (list.size() > 0) {
list.add(path);
return list.toArray(new String[list.size()]);
}
else
return new String[] { path };
}
cb.clear();
while (ch > 0 && ch != ' ' && ch != '\t' && ch != '\r' && ch != '\n') {
cb.append((char) ch);
ch = is.read();
}
list.add(cb.toString());
for (; ch == ' ' || ch == '\t'; ch = is.read()) {
}
}