< prev index next >

src/java.base/share/classes/sun/net/www/MimeEntry.java

Print this page
rev 47483 : [mq]: XXXXXXX-double-trouble-2


 235             // the content is the right thing to do.
 236             try {
 237                 return urlc.getContent();
 238             } catch (Exception e) {
 239                 return null;
 240             }
 241 
 242         case LAUNCH_APPLICATION:
 243             {
 244                 String threadName = command;
 245                 int fst = threadName.indexOf(' ');
 246                 if (fst > 0) {
 247                     threadName = threadName.substring(0, fst);
 248                 }
 249 
 250                 return new MimeLauncher(this, urlc, is,
 251                                         mt.getTempFileTemplate(), threadName);
 252             }
 253 
 254         case UNKNOWN:
 255             // REMIND: What do do here?
 256             return null;
 257         }
 258 
 259         return null;
 260     }
 261 
 262     public boolean matches(String type) {
 263         if (starred) {
 264           // REMIND: is this the right thing or not?
 265           return type.startsWith(typeName);
 266         } else {
 267             return type.equals(typeName);
 268         }
 269     }
 270 
 271     public Object clone() {
 272         // return a shallow copy of this.
 273         MimeEntry theClone = new MimeEntry(typeName);
 274         theClone.action = action;
 275         theClone.command = command;




 235             // the content is the right thing to do.
 236             try {
 237                 return urlc.getContent();
 238             } catch (Exception e) {
 239                 return null;
 240             }
 241 
 242         case LAUNCH_APPLICATION:
 243             {
 244                 String threadName = command;
 245                 int fst = threadName.indexOf(' ');
 246                 if (fst > 0) {
 247                     threadName = threadName.substring(0, fst);
 248                 }
 249 
 250                 return new MimeLauncher(this, urlc, is,
 251                                         mt.getTempFileTemplate(), threadName);
 252             }
 253 
 254         case UNKNOWN:
 255             // REMIND: What to do here?
 256             return null;
 257         }
 258 
 259         return null;
 260     }
 261 
 262     public boolean matches(String type) {
 263         if (starred) {
 264           // REMIND: is this the right thing or not?
 265           return type.startsWith(typeName);
 266         } else {
 267             return type.equals(typeName);
 268         }
 269     }
 270 
 271     public Object clone() {
 272         // return a shallow copy of this.
 273         MimeEntry theClone = new MimeEntry(typeName);
 274         theClone.action = action;
 275         theClone.command = command;


< prev index next >