文件名称:Java权限控制示例源代码.rar
文件大小:16KB
文件格式:RAR
更新时间:2022-07-30 05:33:02
Java源码-系统相关
Java权限控制示例源码,写一个文件到c:/hello.txt,定义写到文件的信息,写信息到文件,关闭输出流。相关代码: //写一个文件到c:/hello.txt byte[] info = "Hello,这是测试信息".getBytes(); //定义写到文件的信息 File testFile = new File("c:/hello.txt"); //定义文件,输出到c:/hello.txt FileOutputStream fout = new FileOutputStream(testFile); fout.write(info); //写信息到文件 fout.close(); //关闭输出流 System.out.println(testFile.getAbsolutePath() " 写入成功");
【文件预览】:
srcfans.com
----Java访问权限控制()
--------89-1.bmp(404KB)
--------89-2.bmp(946KB)
--------PolicyExample.class(989B)
--------PolicyExample.java(606B)
--------89-3.bmp(505KB)