+ int parenPos = format.indexOf("(");
+ if (parenPos > 0)
+ {
+ format = format.substring(0, parenPos).trim();
+ try
+ {
+ return FileFormat.valueOf(format);
+ } catch (IllegalArgumentException e)
+ {
+ System.err.println("Unexpected format: " + format);
+ }
+ }
+ return null;