includes/org/apache/poi/poifs/filesystem/POIFSFileSystem.java
private void closeInputStream(InputStream stream, boolean success) {

        if(stream.markSupported() && !(stream instanceof ByteArrayInputStream)) {
            String msg = "POIFS is closing the supplied input stream of type ("
                    + stream.getClass().getName() + ") which supports mark/reset.  "
                    + "This will be a problem for the caller if the stream will still be used.  "
                    + "If that is the case the caller should wrap the input stream to avoid this close logic.  "
                    + "This warning is only temporary and will not be present in future versions of POI.";
            _logger.log(POILogger.WARN, msg);
        }
        try {
            stream.close();
        } catch (IOException e) {
            if(success) {
                throw new RuntimeException(e);
            }
            // else not success? Try block did not complete normally
            // just print stack trace and leave original ex to be thrown
            e.printStackTrace();
        }
    }
/**
     * @param stream the stream to be closed
     * @param success <code>false</code> if an exception is currently being thrown in the calling method
     */
@param stream the stream to be closed
@param success false if an exception is currently being thrown in the calling method
@param stream the stream to be closed @param success false if an exception is currently being thrown in the calling method
private void closeInputStream(InputStream stream, boolean success) {
        if(stream.markSupported() && !(stream instanceof ByteArrayInputStream)) {
            String msg = "POIFS is closing the supplied input stream of type ("
                    + stream.getClass().getName() + ") which supports mark/reset.  "
                    + "This will be a problem for the caller if the stream will still be used.  "
                    + "If that is the case the caller should wrap the input stream to avoid this close logic.  "
                    + "This warning is only temporary and will not be present in future versions of POI.";
            _logger.log(POILogger.WARN, msg);
        }
        try {
            stream.close();
        } catch (IOException e) {
            if(success) {
                throw new RuntimeException(e);
            }
            e.printStackTrace();
        }
    }
private void closeInputStream ( InputStream stream , boolean success ) { if ( stream . markSupported ( ) && ! ( stream instanceof ByteArrayInputStream ) ) { String msg = "POIFS is closing the supplied input stream of type (" + stream . getClass ( ) . getName ( ) + ") which supports mark/reset.  " + "This will be a problem for the caller if the stream will still be used.  " + "If that is the case the caller should wrap the input stream to avoid this close logic.  " + "This warning is only temporary and will not be present in future versions of POI." ; _logger . log ( POILogger . WARN , msg ) ; } try { stream . close ( ) ; } catch ( IOException e ) { if ( success ) { throw new RuntimeException ( e ) ; } e . printStackTrace ( ) ; } }
@param stream the stream to be closed
 @param success <code>false</code> if an exception is currently being thrown in the calling method
@param stream the stream to be closed @param success <code > false< / code > if an exception is currently being thrown in the calling method
// else not success? Try block did not complete normally
 // just print stack trace and leave original ex to be thrown
