@Override public String toString() { return "JarEntryFile["+getEntryName()+"]"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public String toString() { return "JarEntryFile["+getEntryName()+"]"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public String toString() { return "JarEntryFile["+getEntryName()+"]"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public String toString() { return "JarEntryFile["+getEntryName()+"]"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public String toString() { return "JarEntryFile["+getEntryName()+"]"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public String toString() { return "JarEntryFile["+getEntryName()+"]"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public InputStream getContents() throws CoreException { ZipFile zipFile = null; try { zipFile = getZipFile(); if (JavaModelManager.ZIP_ACCESS_VERBOSE) { System.out.println("(" + Thread.currentThread() + ") [JarEntryFile.getContents()] Creating ZipFile on " +zipFile.getName()); //$NON-NLS-1$ //$NON-NLS-2$ } String entryName = getEntryName(); ZipEntry zipEntry = zipFile.getEntry(entryName); if (zipEntry == null){ throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, entryName)); } byte[] contents = Util.getZipEntryByteContent(zipEntry, zipFile); return new ByteArrayInputStream(contents); } catch (IOException e){ throw new JavaModelException(e, IJavaModelStatusConstants.IO_EXCEPTION); } finally { // avoid leaking ZipFiles JavaModelManager.getJavaModelManager().closeZipFile(zipFile); } }
public InputStream getContents() throws CoreException { ZipFile zipFile = null; try { zipFile = getZipFile(); if (JavaModelManager.ZIP_ACCESS_VERBOSE) { System.out.println("(" + Thread.currentThread() + ") [JarEntryFile.getContents()] Creating ZipFile on " +zipFile.getName()); //$NON-NLS-1$ //$NON-NLS-2$ } String entryName = getEntryName(); ZipEntry zipEntry = zipFile.getEntry(entryName); if (zipEntry == null){ throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, entryName)); } byte[] contents = Util.getZipEntryByteContent(zipEntry, zipFile); return new ByteArrayInputStream(contents); } catch (IOException e){ throw new JavaModelException(e, IJavaModelStatusConstants.IO_EXCEPTION); } finally { // avoid leaking ZipFiles JavaModelManager.getJavaModelManager().closeZipFile(zipFile); } }
public InputStream getContents() throws CoreException { ZipFile zipFile = null; try { zipFile = getZipFile(); if (JavaModelManager.ZIP_ACCESS_VERBOSE) { System.out.println("(" + Thread.currentThread() + ") [JarEntryFile.getContents()] Creating ZipFile on " +zipFile.getName()); //$NON-NLS-1$ //$NON-NLS-2$ } String entryName = getEntryName(); ZipEntry zipEntry = zipFile.getEntry(entryName); if (zipEntry == null){ throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, entryName)); } byte[] contents = Util.getZipEntryByteContent(zipEntry, zipFile); return new ByteArrayInputStream(contents); } catch (IOException e){ throw new JavaModelException(e, IJavaModelStatusConstants.IO_EXCEPTION); } finally { // avoid leaking ZipFiles JavaModelManager.getJavaModelManager().closeZipFile(zipFile); } }
public InputStream getContents() throws CoreException { ZipFile zipFile = null; try { zipFile = getZipFile(); if (JavaModelManager.ZIP_ACCESS_VERBOSE) { System.out.println("(" + Thread.currentThread() + ") [JarEntryFile.getContents()] Creating ZipFile on " +zipFile.getName()); //$NON-NLS-1$ //$NON-NLS-2$ } String entryName = getEntryName(); ZipEntry zipEntry = zipFile.getEntry(entryName); if (zipEntry == null){ throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, entryName)); } byte[] contents = Util.getZipEntryByteContent(zipEntry, zipFile); return new ByteArrayInputStream(contents); } catch (IOException e){ throw new JavaModelException(e, IJavaModelStatusConstants.IO_EXCEPTION); } finally { // avoid leaking ZipFiles JavaModelManager.getJavaModelManager().closeZipFile(zipFile); } }
Object target = JavaModel.getTarget(rootPath, false); if (target != null && target instanceof File) { return JRTUtil.getContentFromJrt((File) target, getEntryName(), root.getElementName()); System.out.println("(" + Thread.currentThread() + ") [JarEntryFile.getContents()] Creating ZipFile on " +zipFile.getName()); //$NON-NLS-1$ //$NON-NLS-2$ String entryName = getEntryName(); ZipEntry zipEntry = zipFile.getEntry(entryName); if (zipEntry == null){
Object target = JavaModel.getTarget(rootPath, false); if (target != null && target instanceof File) { return JRTUtil.getContentFromJrt((File) target, getEntryName(), root.getElementName()); System.out.println("(" + Thread.currentThread() + ") [JarEntryFile.getContents()] Creating ZipFile on " +zipFile.getName()); //$NON-NLS-1$ //$NON-NLS-2$ String entryName = getEntryName(); ZipEntry zipEntry = zipFile.getEntry(entryName); if (zipEntry == null){