437 * @param classLoader the class loader to use
438 * @exception ClassNotFoundException if the class is not loaded
439 * @exception IllegalArgumentException if <code>mimeType</code> is
440 * invalid
441 * @exception NullPointerException if <code>mimeType</code> is null
442 */
443 public DataFlavor(String mimeType, String humanPresentableName, ClassLoader classLoader) throws ClassNotFoundException {
444 super();
445 if (mimeType == null) {
446 throw new NullPointerException("mimeType");
447 }
448 try {
449 initialize(mimeType, humanPresentableName, classLoader);
450 } catch (MimeTypeParseException mtpe) {
451 throw new IllegalArgumentException("failed to parse:" + mimeType);
452 }
453 }
454
455 /**
456 * Constructs a <code>DataFlavor</code> from a <code>mimeType</code> string.
457 * The string can specify a "class=<fully specified Java class name>"
458 * parameter to create a <code>DataFlavor</code> with the desired
459 * representation class. If the string does not contain "class=" parameter,
460 * <code>java.io.InputStream</code> is used as default.
461 *
462 * @param mimeType the string used to identify the MIME type for this flavor;
463 * if the class specified by "class=" parameter is not
464 * successfully loaded, then an
465 * <code>ClassNotFoundException</code> is thrown
466 * @exception ClassNotFoundException if the class is not loaded
467 * @exception IllegalArgumentException if <code>mimeType</code> is
468 * invalid
469 * @exception NullPointerException if <code>mimeType</code> is null
470 */
471 public DataFlavor(String mimeType) throws ClassNotFoundException {
472 super();
473 if (mimeType == null) {
474 throw new NullPointerException("mimeType");
475 }
476 try {
477 initialize(mimeType, null, this.getClass().getClassLoader());
|
437 * @param classLoader the class loader to use
438 * @exception ClassNotFoundException if the class is not loaded
439 * @exception IllegalArgumentException if <code>mimeType</code> is
440 * invalid
441 * @exception NullPointerException if <code>mimeType</code> is null
442 */
443 public DataFlavor(String mimeType, String humanPresentableName, ClassLoader classLoader) throws ClassNotFoundException {
444 super();
445 if (mimeType == null) {
446 throw new NullPointerException("mimeType");
447 }
448 try {
449 initialize(mimeType, humanPresentableName, classLoader);
450 } catch (MimeTypeParseException mtpe) {
451 throw new IllegalArgumentException("failed to parse:" + mimeType);
452 }
453 }
454
455 /**
456 * Constructs a <code>DataFlavor</code> from a <code>mimeType</code> string.
457 * The string can specify a "class=<fully specified Java class name>"
458 * parameter to create a <code>DataFlavor</code> with the desired
459 * representation class. If the string does not contain "class=" parameter,
460 * <code>java.io.InputStream</code> is used as default.
461 *
462 * @param mimeType the string used to identify the MIME type for this flavor;
463 * if the class specified by "class=" parameter is not
464 * successfully loaded, then an
465 * <code>ClassNotFoundException</code> is thrown
466 * @exception ClassNotFoundException if the class is not loaded
467 * @exception IllegalArgumentException if <code>mimeType</code> is
468 * invalid
469 * @exception NullPointerException if <code>mimeType</code> is null
470 */
471 public DataFlavor(String mimeType) throws ClassNotFoundException {
472 super();
473 if (mimeType == null) {
474 throw new NullPointerException("mimeType");
475 }
476 try {
477 initialize(mimeType, null, this.getClass().getClassLoader());
|