/** * Creates a new <code>BundleFileWrapper</code> instance wrapping the * given {@link BundleFile bundle file}. * * @param bundleFile - The bundle file to wrap. * @throws NullPointerException - If the bundle file is <code>null</code>. */ public BundleFileWrapper(BundleFile bundleFile) { super(bundleFile.getBaseFile()); this.bundleFile = bundleFile; }
/** * Creates a new <code>BundleFileWrapper</code> instance wrapping the * given {@link BundleFile bundle file}. * * @param bundleFile - The bundle file to wrap. * @throws NullPointerException - If the bundle file is <code>null</code>. */ public BundleFileWrapper(BundleFile bundleFile) { super(bundleFile.getBaseFile()); this.bundleFile = bundleFile; }
/** * Creates a new <code>BundleFileWrapper</code> instance wrapping the * given {@link BundleFile bundle file}. * * @param bundleFile - The bundle file to wrap. * @throws NullPointerException - If the bundle file is <code>null</code>. */ public BundleFileWrapper(BundleFile bundleFile) { super(bundleFile.getBaseFile()); this.bundleFile = bundleFile; }
/** * Creates a new <code>BundleFileWrapper</code> instance wrapping the * given {@link BundleFile bundle file}. * * @param bundleFile - The bundle file to wrap. * @throws NullPointerException - If the bundle file is <code>null</code>. */ public BundleFileWrapper(BundleFile bundleFile) { super(bundleFile.getBaseFile()); this.bundleFile = bundleFile; }
/** * Creates a new <code>BundleFileWrapper</code> instance wrapping the * given {@link BundleFile bundle file}. * * @param bundleFile - The bundle file to wrap. * @throws NullPointerException - If the bundle file is <code>null</code>. */ public BundleFileWrapper(BundleFile bundleFile) { super(bundleFile.getBaseFile()); this.bundleFile = bundleFile; }
/** * Creates a new <code>BundleFileWrapper</code> instance wrapping the * given {@link BundleFile bundle file}. * * @param bundleFile - The bundle file to wrap. * @throws NullPointerException - If the bundle file is <code>null</code>. */ public BundleFileWrapper(BundleFile bundleFile) { super(bundleFile.getBaseFile()); this.bundleFile = bundleFile; }
/** * The constructor * @param wrapped the real bundle file */ public CDSBundleFile(BundleFile wrapped) { super(wrapped); // get the url to the content of the real bundle file try { this.url = new URL("file", "", wrapped.getBaseFile().getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$ } catch (MalformedURLException e) { // do nothing } }
/** * Constructs a NestedDirBundleFile * @param baseBundlefile the base bundle file * @param cp */ public NestedDirBundleFile(BundleFile baseBundlefile, String cp) { super(baseBundlefile.getBaseFile()); this.baseBundleFile = baseBundlefile; if (cp.charAt(cp.length() - 1) != '/') { cp = cp + '/'; } this.cp = cp; }
/** * Constructs a NestedDirBundleFile * @param baseBundlefile the base bundle file * @param cp */ public NestedDirBundleFile(BundleFile baseBundlefile, String cp) { super(baseBundlefile.getBaseFile()); this.baseBundleFile = baseBundlefile; if (cp.charAt(cp.length() - 1) != '/') { cp = cp + '/'; } this.cp = cp; }
private void verifyDigests() throws InvalidContentException { // Check the digest at end of file for (int i = 0; i < digests.length; i++) { byte rc[] = digests[i].digest(); if (!MessageDigest.isEqual(result[i], rc)) throw new InvalidContentException(NLS.bind(SignedContentMessages.File_In_Jar_Is_Tampered, entry.getName(), bundleFile.getBaseFile()), null); } }
private void verifyDigests() throws InvalidContentException { // Check the digest at end of file for (int i = 0; i < digests.length; i++) { byte rc[] = digests[i].digest(); if (!MessageDigest.isEqual(result[i], rc)) throw new InvalidContentException(NLS.bind(SignedContentMessages.File_In_Jar_Is_Tampered, entry.getName(), bundleFile.getBaseFile()), null); } }
private void verifyDigests() throws InvalidContentException { // Check the digest at end of file for (int i = 0; i < digests.length; i++) { byte rc[] = digests[i].digest(); if (!MessageDigest.isEqual(result[i], rc)) throw new InvalidContentException(NLS.bind(SignedContentMessages.File_In_Jar_Is_Tampered, entry.getName(), bundleFile.getBaseFile()), null); } }
private void verifyDigests() throws InvalidContentException { // Check the digest at end of file for (int i = 0; i < digests.length; i++) { byte rc[] = digests[i].digest(); if (!MessageDigest.isEqual(result[i], rc)) throw new InvalidContentException(NLS.bind(SignedContentMessages.File_In_Jar_Is_Tampered, entry.getName(), bundleFile.getBaseFile()), null); } }
private void verifyDigests() throws InvalidContentException { // Check the digest at end of file for (int i = 0; i < digests.length; i++) { byte rc[] = digests[i].digest(); if (!MessageDigest.isEqual(result[i], rc)) throw new InvalidContentException(NLS.bind(SignedContentMessages.File_In_Jar_Is_Tampered, entry.getName(), bundleFile.getBaseFile()), null); } }
private void verifyDigests() throws InvalidContentException { // Check the digest at end of file for (int i = 0; i < digests.length; i++) { byte rc[] = digests[i].digest(); if (!MessageDigest.isEqual(result[i], rc)) throw new InvalidContentException(NLS.bind(SignedContentMessages.File_In_Jar_Is_Tampered, entry.getName(), bundleFile.getBaseFile()), null); } }
public SignedContent run() throws Exception { return getSignedContent(generation.getBundleFile().getBaseFile()); } });
public SignedContent run() throws Exception { return getSignedContent(generation.getBundleFile().getBaseFile()); } });
private Generation findFragmentSource(Generation hostGeneration, String cp, ClasspathManager manager, boolean fromFragment) { if (hostGeneration != manager.getGeneration()) return hostGeneration; File file = new File(cp); if (!file.isAbsolute()) return hostGeneration; FragmentClasspath[] fragCP = manager.getFragmentClasspaths(); for (int i = 0; i < fragCP.length; i++) { BundleFile fragBase = fragCP[i].getGeneration().getBundleFile(); File fragFile = fragBase.getBaseFile(); if (fragFile != null && file.getPath().startsWith(fragFile.getPath())) return fragCP[i].getGeneration(); } return fromFragment ? null : hostGeneration; }
/** * Constructs a ClasspathElement with the specified bundlefile and domain * @param bundlefile A BundleFile object which acts as a source * @param domain the protection domain */ public ClasspathEntry(BundleFile bundlefile, ProtectionDomain domain, Generation generation) { this.bundlefile = bundlefile; this.domain = domain; this.data = new PDEData(generation.getBundleFile().getBaseFile(), generation.getRevision().getSymbolicName()); this.manifest = getManifest(bundlefile, generation); }
/** * Constructs a ClasspathElement with the specified bundlefile and domain * @param bundlefile A BundleFile object which acts as a source * @param domain the protection domain */ public ClasspathEntry(BundleFile bundlefile, ProtectionDomain domain, Generation generation) { this.bundlefile = bundlefile; this.domain = domain; this.data = new PDEData(generation.getBundleFile().getBaseFile(), generation.getRevision().getSymbolicName()); this.manifest = getManifest(bundlefile, generation); }