public static void readAndCloseStream ( InputStream is ) { final byte [ ] bytes = new byte [ DEFAULT_BUFFER_SIZE ] ; try { while ( is . read ( bytes , 0 , DEFAULT_BUFFER_SIZE ) != - 1 ) ; } catch ( IOException ignored ) { } finally { closeSilently ( is ) ; } }
Reads all data from stream and close it silently