modules/media/src/main/java/com/sun/media/jfxmediaimpl/platform/ios/IOSPlatform.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -29,10 +29,11 @@
import com.sun.media.jfxmedia.MediaPlayer;
import com.sun.media.jfxmedia.locator.Locator;
import com.sun.media.jfxmedia.logging.Logger;
import com.sun.media.jfxmediaimpl.HostUtils;
import com.sun.media.jfxmediaimpl.platform.Platform;
+import java.util.Arrays;
/**
* iOS Platform implementation.
*/
public final class IOSPlatform extends Platform {
@@ -52,10 +53,19 @@
"video/quicktime",
"video/x-quicktime",
"audio/x-aiff"
};
+ /**
+ * All supported protocols.
+ */
+ private static final String[] PROTOCOLS = {
+ "http",
+ "https",
+ "ipod-library"
+ };
+
private static final class IOSPlatformInitializer {
private static final IOSPlatform globalInstance = new IOSPlatform();
}
public static Platform getPlatformInstance() {
@@ -86,13 +96,16 @@
return true;
}
@Override
public String[] getSupportedContentTypes() {
- String[] contentTypesCopy = new String[CONTENT_TYPES.length];
- System.arraycopy(CONTENT_TYPES, 0, contentTypesCopy, 0, CONTENT_TYPES.length);
- return contentTypesCopy;
+ return Arrays.copyOf(CONTENT_TYPES, CONTENT_TYPES.length);
+ }
+
+ @Override
+ public String[] getSupportedProtocols() {
+ return Arrays.copyOf(PROTOCOLS, PROTOCOLS.length);
}
@Override
public Media createMedia(Locator source) {
return new IOSMedia(source);