1 4 7 package javax.xml.crypto.dsig.spec; 8 9 import javax.xml.crypto.dsig.CanonicalizationMethod; 10 import java.util.ArrayList ; 11 import java.util.Collections ; 12 import java.util.List ; 13 14 39 public final class ExcC14NParameterSpec implements C14NMethodParameterSpec { 40 41 private List preList; 42 43 46 public static final String DEFAULT = "#default"; 47 48 52 public ExcC14NParameterSpec() { 53 preList = Collections.EMPTY_LIST; 54 } 55 56 68 public ExcC14NParameterSpec(List prefixList) { 69 if (prefixList == null) { 70 throw new NullPointerException ("prefixList cannot be null"); 71 } 72 this.preList = new ArrayList (prefixList); 73 for (int i = 0, size = preList.size(); i < size; i++) { 74 if (!(preList.get(i) instanceof String )) { 75 throw new ClassCastException ("not a String"); 76 } 77 } 78 preList = Collections.unmodifiableList(preList); 79 } 80 81 91 public List getPrefixList() { 92 return preList; 93 } 94 } 95 | Popular Tags |