随笔2017/12/21

/**

  * 把byte[]数组的内容写到文件里面,文件名字叫做flash.swf。
  * 位置在getCacheDir这个目录/data/data/包名/cache里面
  *
  * @param swfByte
  * byte数组
  *
  */
public void byte2File(byte[] swfByte) {  
 File tempSwf;  
 try {  
  // TODO 文件名字叫做flash.swf  
  tempSwf = File.createTempFile("flash", "swf", getCacheDir());  
  tempSwf.deleteOnExit();  
  FileOutputStream fos = new FileOutputStream(tempSwf);  
  fos.write(swfByte);  
  fos.close();  
 } catch (Exception e) {  
  e.printStackTrace();  
 }  
  
}  

 @readonly = "readonly"

原文地址:https://www.cnblogs.com/william-CuiCui0705/p/8079143.html