Java素材文件在哪个文件夹_java目录、文件操作.doc

java目录、文件操作.doc

2cab1216310628c04c44df8e78157538.gif

还剩

16页未读,

继续阅读

下载文档到电脑,马上远离加班熬夜!

亲,喜欢就下载吧,价低环保!

内容要点:

byte[] b = new byte[1024 * 5]; int len; while ( (len = input.read(b)) != -1) { output.write(b, 0, len); } output.flush(); output.close(); input.close(); } i FileOutputStream fs = new FileOutputStream(newPath); byte[] buffer = new byte[1444]; int length; while ( (byteread = inStream.read(buffer)) != -1) { bytesum += byt /** * 删除文件夹里面的所有文件 * @param path String 文件夹路径 如 c:/fqf */ public void delAllFile(String path) { File file = new File(path); if (!file.exists()) { return; } if (!file.isD * 删除文件 * @param filePathAndName String 文件路径及名称 如 c:/fqf.txt * @param fileContent String * @return boolean */ public void delFile(String filePathAndName) { try { String fil String filePath = folderPath; filePath = filePath.toString(); java.io.File myFilePath = new java.io.File(filePath); if (!myFilePath.exists()) { myFilePath.mkdir(); } } cat fileIn.close(); } catch (IOException e) { } } } } private static void listFile(File parentFile, List nameList, List fileList, String directoryName) { if (parentFile.isDirectory()) { File[] files FileInputStream fileIn = null; StringBuffer sb = new StringBuffer(outputZipNameAndPath); // FileInputStream fileIn =null; try { if (outputZipNameAndPath.indexOf(".zip") != -1) { outputZipNameAndPath if(temp.isFile()){ FileOutputStream output = new FileOutputStream(folderList2.get(j) + File.separator + (temp.getName()).toString()); byte[] b = new byte[5120]; int len; while ( (len = input.read(

发表评论

暂无评论,赶快抢占沙发吧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值