public byte[] getBytes() throws IOException { if (classbytes == null) { classbytes = wrapped.getBytes(); } return classbytes; }
public void verify() throws IOException, InvalidContentException { BundleFile currentContent = content; if (currentContent == null) throw new InvalidContentException("The content was not set", null); //$NON-NLS-1$ BundleEntry entry = null; SecurityException exception = null; try { entry = currentContent.getEntry(entryName); } catch (SecurityException e) { exception = e; } if (entry == null) throw new InvalidContentException(NLS.bind(SignedContentMessages.file_is_removed_from_jar, entryName, currentContent.getBaseFile().toString()), exception); entry.getBytes(); } }
public void verify() throws IOException, InvalidContentException { BundleFile currentContent = content; if (currentContent == null) throw new InvalidContentException("The content was not set", null); //$NON-NLS-1$ BundleEntry entry = null; SecurityException exception = null; try { entry = currentContent.getEntry(entryName); } catch (SecurityException e) { exception = e; } if (entry == null) throw new InvalidContentException(NLS.bind(SignedContentMessages.file_is_removed_from_jar, entryName, currentContent.getBaseFile().toString()), exception); entry.getBytes(); } }
public void verify() throws IOException, InvalidContentException { BundleFile currentContent = content; if (currentContent == null) throw new InvalidContentException("The content was not set", null); //$NON-NLS-1$ BundleEntry entry = null; SecurityException exception = null; try { entry = currentContent.getEntry(entryName); } catch (SecurityException e) { exception = e; } if (entry == null) throw new InvalidContentException(NLS.bind(SignedContentMessages.file_is_removed_from_jar, entryName, currentContent.getBaseFile().toString()), exception); entry.getBytes(); } }
public void verify() throws IOException, InvalidContentException { BundleFile currentContent = content; if (currentContent == null) throw new InvalidContentException("The content was not set", null); //$NON-NLS-1$ BundleEntry entry = null; SecurityException exception = null; try { entry = currentContent.getEntry(entryName); } catch (SecurityException e) { exception = e; } if (entry == null) throw new InvalidContentException(NLS.bind(SignedContentMessages.file_is_removed_from_jar, entryName, currentContent.getBaseFile().toString()), exception); entry.getBytes(); } }
public void verify() throws IOException, InvalidContentException { BundleFile currentContent = content; if (currentContent == null) throw new InvalidContentException("The content was not set", null); //$NON-NLS-1$ BundleEntry entry = null; SecurityException exception = null; try { entry = currentContent.getEntry(entryName); } catch (SecurityException e) { exception = e; } if (entry == null) throw new InvalidContentException(NLS.bind(SignedContentMessages.file_is_removed_from_jar, entryName, currentContent.getBaseFile().toString()), exception); entry.getBytes(); } }
public void verify() throws IOException, InvalidContentException { BundleFile currentContent = content; if (currentContent == null) throw new InvalidContentException("The content was not set", null); //$NON-NLS-1$ BundleEntry entry = null; SecurityException exception = null; try { entry = currentContent.getEntry(entryName); } catch (SecurityException e) { exception = e; } if (entry == null) throw new InvalidContentException(NLS.bind(SignedContentMessages.file_is_removed_from_jar, entryName, currentContent.getBaseFile().toString()), exception); entry.getBytes(); } }
classbytes = entry.getBytes(); } catch (IOException e) { if (debug.DEBUG_LOADER)
classbytes = entry.getBytes(); } catch (IOException e) { if (debug.DEBUG_LOADER)
classbytes = entry.getBytes(); } catch (IOException e) { if (debug.DEBUG_LOADER)
classbytes = entry.getBytes(); } catch (IOException e) { if (debug.DEBUG_LOADER)
private Class<?> findClassImpl(String name, ClasspathEntry classpathEntry, List<ClassLoaderHook> hooks) { if (debug.DEBUG_LOADER) Debug.println("ModuleClassLoader[" + classloader.getBundleLoader() + " - " + classpathEntry.getBundleFile() + "].findClassImpl(" + name + ")"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ String filename = name.replace('.', '/').concat(".class"); //$NON-NLS-1$ BundleEntry entry = classpathEntry.findEntry(filename); if (entry == null) return null; byte[] classbytes; try { classbytes = entry.getBytes(); } catch (IOException e) { if (debug.DEBUG_LOADER) Debug.println(" IOException reading " + filename + " from " + classpathEntry.getBundleFile()); //$NON-NLS-1$ //$NON-NLS-2$ throw (LinkageError) new LinkageError("Error reading class bytes: " + name).initCause(e); //$NON-NLS-1$ } if (debug.DEBUG_LOADER) { Debug.println(" read " + classbytes.length + " bytes from " + classpathEntry.getBundleFile() + "!/" + filename); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ Debug.println(" defining class " + name); //$NON-NLS-1$ } try { return defineClass(name, classbytes, classpathEntry, entry, hooks); } catch (Error e) { if (debug.DEBUG_LOADER) Debug.println(" error defining class " + name); //$NON-NLS-1$ throw e; } }
private Class<?> findClassImpl(String name, ClasspathEntry classpathEntry, List<ClassLoaderHook> hooks) { if (debug.DEBUG_LOADER) Debug.println("ModuleClassLoader[" + classloader.getBundleLoader() + " - " + classpathEntry.getBundleFile() + "].findClassImpl(" + name + ")"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ String filename = name.replace('.', '/').concat(".class"); //$NON-NLS-1$ BundleEntry entry = classpathEntry.findEntry(filename); if (entry == null) return null; byte[] classbytes; try { classbytes = entry.getBytes(); } catch (IOException e) { if (debug.DEBUG_LOADER) Debug.println(" IOException reading " + filename + " from " + classpathEntry.getBundleFile()); //$NON-NLS-1$ //$NON-NLS-2$ throw (LinkageError) new LinkageError("Error reading class bytes: " + name).initCause(e); //$NON-NLS-1$ } if (debug.DEBUG_LOADER) { Debug.println(" read " + classbytes.length + " bytes from " + classpathEntry.getBundleFile() + "!/" + filename); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ Debug.println(" defining class " + name); //$NON-NLS-1$ } try { return defineClass(name, classbytes, classpathEntry, entry, hooks); } catch (Error e) { if (debug.DEBUG_LOADER) Debug.println(" error defining class " + name); //$NON-NLS-1$ throw e; } }
byte originalClassBytes[] = entry.getBytes(); if (originalClassBytes != classbytes) {