public static void writeToFile ( InputStream inputStream , File file ) { try ( InputStreamReader inputStreamReader = new InputStreamReader ( inputStream ) ) { writeToFile ( FileCopyUtils . copyToString ( inputStreamReader ) , file , getDefaultCharset ( ) ) ; } catch ( IOException e ) { throw new CitrusRuntimeException ( "Failed to write file" , e ) ; } }
Writes inputStream content to file . Uses default charset encoding .