public void flushStream ( ) { if ( outputStream != null ) { if ( imageBytes == null ) { imageBytes = outputStream . toByteArray ( ) ; } try { outputStream . close ( ) ; } catch ( IOException e ) { Log . w ( CoverageDataPngImage . class . getSimpleName ( ) , "Failed to close output stream" , e ) ; } } }
Flush the output stream and set the image bytes close the stream