public String getFormat() { if (_format == null) { _format = ContentTypes.getFormat(getContentType()); } return _format; }
public String getFormat() { if (_format == null) { _format = ContentTypes.getFormat(getContentType()); } return _format; }
public String getFormat() { if (_format == null) { _format = ContentTypes.getFormat(getContentType()); } return _format; }
public String getFormat() { if (_format == null) { _format = ContentTypes.getFormat(getContentType()); } return _format; }
/** Sets up the format and content type. * It assumes one of them is not null. */ private void setup(String name, String format, String ctype) { if (ctype != null) { int j = ctype.indexOf(';'); if (j >= 0) ctype = ctype.substring(0, j); } if (ctype != null && format == null) { format = ContentTypes.getFormat(ctype); } else if (ctype == null && format != null) { ctype = ContentTypes.getContentType(format); } if (name != null) { if (format == null) { final int j = name.lastIndexOf('.'); if (j >= 0) { format = name.substring(j + 1); if (ctype == null) { ctype = ContentTypes.getContentType(format); } } } } _name = name; _format = format; _ctype = ctype; }