question: private static void writeDngBytesAndClose ( Image image , TotalCaptureResult captureResult , CameraCharacteristics characteristics , File dngFile ) { try ( DngCreator dngCreator = new DngCreator ( characteristics , captureResult ) ; FileOutputStream outputStream = new FileOutputStream ( dngFile ) ) { dngCreator . writeImage ( outputStream , image ) ; outputStream . close ( ) ; image . close ( ) ; } catch ( IOException e ) { Log . e ( TAG , "Could not store DNG file" , e ) ; return ; } Log . i ( TAG , "Successfully stored DNG file: " + dngFile . getAbsolutePath ( ) ) ; }
target:  Take the given RAW image and capture result, convert it to a DNG and write it to disk.