Skip to content

Commit

Permalink
8261750: Remove internal class sun.net.www.MimeLauncher
Browse files Browse the repository at this point in the history
Reviewed-by: alanb, dfuchs
  • Loading branch information
Julia Boes committed Feb 17, 2021
1 parent 8418285 commit 03b586b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 301 deletions.

This file was deleted.

55 changes: 1 addition & 54 deletions src/java.base/share/classes/sun/net/www/MimeEntry.java
@@ -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
Expand Down Expand Up @@ -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?
Expand Down
205 changes: 0 additions & 205 deletions src/java.base/share/classes/sun/net/www/MimeLauncher.java

This file was deleted.

1 comment on commit 03b586b

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.