1 /*
2  * This file is part of libbluray
3  * Copyright (C) 2010  William Hahne
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not, see
17  * <http://www.gnu.org/licenses/>.
18  */
19 
20 package javax.media;
21 
22 import java.util.Vector;
23 
24 public class PackageManager {
PackageManager()25     public PackageManager() {
26     }
27 
getProtocolPrefixList()28     public static Vector getProtocolPrefixList() {
29         return protocolPrefix;
30     }
31 
setProtocolPrefixList(Vector list)32     public static void setProtocolPrefixList(Vector list) {
33         protocolPrefixTemp = list;
34     }
35 
commitProtocolPrefixList()36     public static void commitProtocolPrefixList() {
37         SecurityManager sec = System.getSecurityManager();
38         if (sec != null)
39             sec.checkPropertiesAccess();
40         protocolPrefix = (Vector) protocolPrefixTemp.clone();
41     }
42 
getContentPrefixList()43     public static Vector getContentPrefixList() {
44         return contentPrefix;
45     }
46 
setContentPrefixList(Vector list)47     public static void setContentPrefixList(Vector list) {
48         contentPrefixTemp = list;
49     }
50 
commitContentPrefixList()51     public static void commitContentPrefixList() {
52         SecurityManager sec = System.getSecurityManager();
53         if (sec != null)
54             sec.checkPropertiesAccess();
55         contentPrefix = (Vector) contentPrefixTemp.clone();
56     }
57 
58     private static Vector protocolPrefixTemp = null;
59     private static Vector contentPrefixTemp = null;
60     private static Vector protocolPrefix = null;
61     private static Vector contentPrefix = null;
62 }
63