public InputStream getInputStream() throws IOException { // someone is trying to get the real bytes of the class file!! // just return the entry from the wrapped file instead of the magic cookie return wrapped.getInputStream(); }
public synchronized void connect() throws IOException { if (!connected) { if (bundleEntry != null) { in = bundleEntry.getInputStream(); connected = true; } else { throw new IOException(NLS.bind(Msg.RESOURCE_NOT_FOUND_EXCEPTION, url)); } } }
public synchronized void connect() throws IOException { if (!connected) { if (bundleEntry != null) { in = bundleEntry.getInputStream(); connected = true; } else { throw new IOException(NLS.bind(Msg.RESOURCE_NOT_FOUND_EXCEPTION, url)); } } }
public synchronized void connect() throws IOException { if (!connected) { if (bundleEntry != null) { in = bundleEntry.getInputStream(); connected = true; } else { throw new IOException(NLS.bind(Msg.RESOURCE_NOT_FOUND_EXCEPTION, url)); } } }
public synchronized void connect() throws IOException { if (!connected) { if (bundleEntry != null) { in = bundleEntry.getInputStream(); connected = true; } else { throw new IOException(NLS.bind(Msg.RESOURCE_NOT_FOUND_EXCEPTION, url)); } } }
public synchronized void connect() throws IOException { if (!connected) { if (bundleEntry != null) { in = bundleEntry.getInputStream(); connected = true; } else { throw new IOException(NLS.bind(Msg.RESOURCE_NOT_FOUND_EXCEPTION, url)); } } }
public synchronized void connect() throws IOException { if (!connected) { if (bundleEntry != null) { in = bundleEntry.getInputStream(); connected = true; } else { throw new IOException(NLS.bind(Msg.RESOURCE_NOT_FOUND_EXCEPTION, url)); } } }
private InputStream findInSystemBundle(Generation systemGeneration, String entry) { BundleFile systemContent = systemGeneration.getBundleFile(); BundleEntry systemEntry = systemContent != null ? systemContent.getEntry(entry) : null; InputStream result = null; if (systemEntry != null) { try { result = systemEntry.getInputStream(); } catch (IOException e) { // Do nothing } } if (result == null) { // Check the ClassLoader in case we're launched off the Java boot classpath ClassLoader loader = getClass().getClassLoader(); result = loader == null ? ClassLoader.getSystemResourceAsStream(entry) : loader.getResourceAsStream(entry); } return result; }
InputStream getDigestInputStream(BundleEntry nestedEntry) throws IOException { if (contentMDResults == null) return nestedEntry.getInputStream(); Object[] mdResult = (Object[]) contentMDResults.get(nestedEntry.getName()); if (mdResult == null) return null; try { return new DigestedInputStream(nestedEntry, content, (SignerInfo[]) mdResult[0], (byte[][]) mdResult[1], nestedEntry.getSize()); } catch (NoSuchAlgorithmException e) { throw new IOException(e); } }
InputStream getDigestInputStream(BundleEntry nestedEntry) throws IOException { if (contentMDResults == null) return nestedEntry.getInputStream(); Object[] mdResult = (Object[]) contentMDResults.get(nestedEntry.getName()); if (mdResult == null) return null; try { return new DigestedInputStream(nestedEntry, content, (SignerInfo[]) mdResult[0], (byte[][]) mdResult[1], nestedEntry.getSize()); } catch (NoSuchAlgorithmException e) { throw new IOException(e); } }
InputStream getDigestInputStream(BundleEntry nestedEntry) throws IOException { if (contentMDResults == null) return nestedEntry.getInputStream(); Object[] mdResult = (Object[]) contentMDResults.get(nestedEntry.getName()); if (mdResult == null) return null; try { return new DigestedInputStream(nestedEntry, content, (SignerInfo[]) mdResult[0], (byte[][]) mdResult[1], nestedEntry.getSize()); } catch (NoSuchAlgorithmException e) { throw new IOException(e); } }
InputStream getDigestInputStream(BundleEntry nestedEntry) throws IOException { if (contentMDResults == null) return nestedEntry.getInputStream(); Object[] mdResult = (Object[]) contentMDResults.get(nestedEntry.getName()); if (mdResult == null) return null; try { return new DigestedInputStream(nestedEntry, content, (SignerInfo[]) mdResult[0], (byte[][]) mdResult[1], nestedEntry.getSize()); } catch (NoSuchAlgorithmException e) { throw new IOException(e); } }
InputStream getDigestInputStream(BundleEntry nestedEntry) throws IOException { if (contentMDResults == null) return nestedEntry.getInputStream(); Object[] mdResult = (Object[]) contentMDResults.get(nestedEntry.getName()); if (mdResult == null) return null; try { return new DigestedInputStream(nestedEntry, content, (SignerInfo[]) mdResult[0], (byte[][]) mdResult[1], nestedEntry.getSize()); } catch (NoSuchAlgorithmException e) { throw new IOException(e); } }
InputStream getDigestInputStream(BundleEntry nestedEntry) throws IOException { if (contentMDResults == null) return nestedEntry.getInputStream(); Object[] mdResult = (Object[]) contentMDResults.get(nestedEntry.getName()); if (mdResult == null) return null; try { return new DigestedInputStream(nestedEntry, content, (SignerInfo[]) mdResult[0], (byte[][]) mdResult[1], nestedEntry.getSize()); } catch (NoSuchAlgorithmException e) { throw new IOException(e); } }
/** * Used for class loading. This default implementation gets the input stream from this entry * and copies the content into a byte array. * @return a byte array containing the content of this entry * @throws IOException */ public byte[] getBytes() throws IOException { InputStream in = getInputStream(); int length = (int) getSize(); // if (Debug.DEBUG_LOADER) // Debug.println(" about to read " + length + " bytes from " + getName()); //$NON-NLS-1$ //$NON-NLS-2$ return StorageUtil.getBytes(in, length, BUF_SIZE); } }
/** * Used for class loading. This default implementation gets the input stream from this entry * and copies the content into a byte array. * @return a byte array containing the content of this entry * @throws IOException */ public byte[] getBytes() throws IOException { InputStream in = getInputStream(); int length = (int) getSize(); // if (Debug.DEBUG_LOADER) // Debug.println(" about to read " + length + " bytes from " + getName()); //$NON-NLS-1$ //$NON-NLS-2$ return StorageUtil.getBytes(in, length, BUF_SIZE); } }
/** * Used for class loading. This default implementation gets the input stream from this entry * and copies the content into a byte array. * @return a byte array containing the content of this entry * @throws IOException */ public byte[] getBytes() throws IOException { InputStream in = getInputStream(); int length = (int) getSize(); // if (Debug.DEBUG_LOADER) // Debug.println(" about to read " + length + " bytes from " + getName()); //$NON-NLS-1$ //$NON-NLS-2$ return StorageUtil.getBytes(in, length, BUF_SIZE); } }
/** * Used for class loading. This default implementation gets the input stream from this entry * and copies the content into a byte array. * @return a byte array containing the content of this entry * @throws IOException */ public byte[] getBytes() throws IOException { InputStream in = getInputStream(); int length = (int) getSize(); // if (Debug.DEBUG_LOADER) // Debug.println(" about to read " + length + " bytes from " + getName()); //$NON-NLS-1$ //$NON-NLS-2$ return StorageUtil.getBytes(in, length, BUF_SIZE); } }
/** * Used for class loading. This default implementation gets the input stream from this entry * and copies the content into a byte array. * @return a byte array containing the content of this entry * @throws IOException */ public byte[] getBytes() throws IOException { InputStream in = getInputStream(); int length = (int) getSize(); // if (Debug.DEBUG_LOADER) // Debug.println(" about to read " + length + " bytes from " + getName()); //$NON-NLS-1$ //$NON-NLS-2$ return StorageUtil.getBytes(in, length, BUF_SIZE); } }
/** * Used for class loading. This default implementation gets the input stream from this entry * and copies the content into a byte array. * @return a byte array containing the content of this entry * @throws IOException */ public byte[] getBytes() throws IOException { InputStream in = getInputStream(); int length = (int) getSize(); // if (Debug.DEBUG_LOADER) // Debug.println(" about to read " + length + " bytes from " + getName()); //$NON-NLS-1$ //$NON-NLS-2$ return StorageUtil.getBytes(in, length, BUF_SIZE); } }