{
return false;
}
line = in.nextLine().trim();
Styles s = Styles.getEnum(line.substring(0, line.indexOf(':')));
if (s == null)
{
return false;
}
setStyle(s);
line = in.nextLine().trim();
String edit = line.substring(0, line.indexOf(':'));
if (edit.length() == 0)
{
edit = "Replace This";
}
else if (edit.length() > 12)
{
return false; // too long.
}
setEditName(edit);
in.nextLine(); // Edit: line: skip.
line = in.nextLine().trim();
line = line.substring(0, line.indexOf(':'));
setDifficulty(Integer.parseInt(line));
in.nextLine();
ArrayList<String> rows = new ArrayList<String>();
boolean done = false;
int measure = 0;
final int MAX = 192;
while (!done)
{
line = in.nextLine().trim();
if (line.length() == 0 || line.charAt(0) == ','
|| line.charAt(0) == ';' || line.substring(0, 2).equals("//"))
{
if (rows.isEmpty())
{
continue;
}
int i = 0;
for (String l : rows)
{
getMeasure(measure).getBeat(i * MAX / rows.size()).setRow(l);
i++;
}
rows.clear();
if (line.charAt(0) == ';')
{
done = true;
}
measure++;
}
else
{
rows.add(line.substring(0, s.getColumns()));
}
}
}
catch (FileNotFoundException e)
{