public static FileMessage decode ( ByteArray encodedMessage , File file ) throws IOException { try ( OutputStream out = new FileOutputStream ( file ) ) { out . write ( encodedMessage . array , 0 , encodedMessage . size ) ; } return new FileMessage ( true , file ) ; }
Restores this message into the provided file .