text: public short getFormat(String format, boolean createIfNotFound) {for (FormatRecord r : formats) {if (r.getFormatString().equals(format)) {return (short)r.getIndexCode();}}if (createIfNotFound) {return (short)createFormat(format);}return -1;}