/** * Convert the {@link InputStream} to {@link String} and close the passed stream * * @param inputStream the input stream * @return a string representation of the input data * @throws IOException */ public static String streamToString( InputStream inputStream ) throws IOException { try { return new String(loadInputStreamToMemory(inputStream)); } finally { IoUtils.closeStream(inputStream); } }
byte[] byteArr = loadInputStreamToMemory(jarFile.getInputStream(jarEntry)); return new ByteArrayInputStream(byteArr); } finally {