@Test public void testRead() { try { InputStream inputStream = JarAccessor.readEntry(JarAccessorTest.class.getResource(FEATURE_TEST_JAR).toURI().toString(), FEATURE_TEST_XML); assertNotNull(inputStream); } catch (URISyntaxException e) { e.printStackTrace(); fail(); } }
static InputStream readEntry(String jarUrl, String entryName) { try { URL url = new URL(convertToJarUrl(jarUrl)); JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); JarFile jarFile = jarConnection.getJarFile(); return jarFile.getInputStream(jarFile.getEntry(entryName)); } catch (IOException e) { LoggingSupport.logErrorMessage(e.getMessage(), e); } return null; }
JarAccessor { static InputStream readEntry(String jarUrl, String entryName) { try { URL url = new URL(convertToJarUrl(jarUrl)); JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); JarFile jarFile = jarConnection.getJarFile(); return jarFile.getInputStream(jarFile.getEntry(entryName)); } catch (IOException e) { LoggingSupport.logErrorMessage(e.getMessage(), e); } return null; } }
JarAccessor { static InputStream readEntry(String jarUrl, String entryName) { try { URL url = new URL(convertToJarUrl(jarUrl)); JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); JarFile jarFile = jarConnection.getJarFile(); return jarFile.getInputStream(jarFile.getEntry(entryName)); } catch (IOException e) { LoggingSupport.logErrorMessage(e.getMessage(), e); } return null; }  }
JarAccessor { static InputStream readEntry(String jarUrl, String entryName) { try { URL url = new URL(convertToJarUrl(jarUrl)); JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); JarFile jarFile = jarConnection.getJarFile(); return jarFile.getInputStream(jarFile.getEntry(entryName)); } catch (IOException e) { LoggingSupport.logErrorMessage(e.getMessage(), e); } return null; }   }
JarAccessor { static InputStream readEntry(String jarUrl, String entryName) { try { URL url = new URL(convertToJarUrl(jarUrl)); JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); JarFile jarFile = jarConnection.getJarFile(); return jarFile.getInputStream(jarFile.getEntry(entryName)); } catch (IOException e) { LoggingSupport.logErrorMessage(e.getMessage(), e); } return null; }    }