base64 convert mp4 video file

1, base64 mp4 file is converted into

    / ** 
     * video base64 base64 string 
     * videoFilePath output video file path with the file name 
     * / 
    public static void base64ToVideo (base64 String, String videoFilePath) { 
        the try { 
            // Base decryption 
            byte [] videoByte = new sun.misc.BASE64Decoder ( ) .decodeBuffer (Base64); 
            file = videofile new new file (videoFilePath); 
            // input file and 
            a FileOutputStream fos = new new a FileOutputStream (videofile); 
            fos.write (videoByte, 0, videoByte.length); 
            fos.flush (); 
            fos .close (); 
        } the catch (IOException E) { 
            log.info ( "Base64 into a video abnormality"); 
        } 
    }

 

Guess you like

Origin www.cnblogs.com/Small-sunshine/p/12482198.html