< prev index next >

apps/samples/Ensemble8/src/samples/java/ensemble/samples/media/audioclip/AudioClipApp.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates.
+ * Copyright (c) 2008, 2019, Oracle and/or its affiliates.
  * All rights reserved. Use is subject to license terms.
  *
  * This file is available and licensed under the following license:
  *
  * Redistribution and use in source and binary forms, with or without

@@ -126,11 +126,11 @@
             }
 
             URL noteURL = baseURI.resolve("resources/"+name).toURL();
 
             // check if the resource exists, then try to load it
-            if (noteURL.getProtocol().equals("http")) {
+            if (noteURL.getProtocol().equals("http") || noteURL.getProtocol().equals("https")) {
                 HttpURLConnection urlCon = (HttpURLConnection)noteURL.openConnection();
                 urlCon.setRequestMethod("HEAD");
                 urlCon.connect();
                 if (urlCon.getResponseCode() != HttpURLConnection.HTTP_OK) {
                     noteURL = null;
< prev index next >