Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8261750: Remove internal class sun.net.www.MimeLauncher
Reviewed-by: alanb, dfuchs
  • Loading branch information
FrauBoes committed Feb 17, 2021
1 parent 8418285 commit 03b586b32cc1c471f2c7d60122b866bb71554a4a

This file was deleted.

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -204,59 +204,6 @@ private boolean isStarred(String typeName) {
return typeName != null && typeName.endsWith("/*");
}

/**
* Invoke the MIME type specific behavior for this MIME type.
* Returned value can be one of several types:
* <ol>
* <li>A thread -- the caller can choose when to launch this thread.
* <li>A string -- the string is loaded into the browser directly.
* <li>An input stream -- the caller can read from this byte stream and
* will typically store the results in a file.
* <li>A document (?) --
* </ol>
*/
public Object launch(java.net.URLConnection urlc, InputStream is, MimeTable mt) throws ApplicationLaunchException {
switch (action) {
case SAVE_TO_FILE:
// REMIND: is this really the right thing to do?
try {
return is;
} catch(Exception e) {
// I18N
return "Load to file failed:\n" + e;
}

case LOAD_INTO_BROWSER:
// REMIND: invoke the content handler?
// may be the right thing to do, may not be -- short term
// where docs are not loaded asynch, loading and returning
// the content is the right thing to do.
try {
return urlc.getContent();
} catch (Exception e) {
return null;
}

case LAUNCH_APPLICATION:
{
String threadName = command;
int fst = threadName.indexOf(' ');
if (fst > 0) {
threadName = threadName.substring(0, fst);
}

return new MimeLauncher(this, urlc, is,
mt.getTempFileTemplate(), threadName);
}

case UNKNOWN:
// REMIND: What to do here?
return null;
}

return null;
}

public boolean matches(String type) {
if (starred) {
// REMIND: is this the right thing or not?

This file was deleted.

0 comments on commit 03b586b

Please sign in to comment.