/*
软件作者:https://xuhss.com/oxox/pro
*/
importClass(java.io.DataInputStream)
importClass(java.io.DataOutputStream)
importClass(java.io.FileInputStream)
importClass(java.io.FileOutputStream)
importClass(java.io.IOException)
importClass(java.io.InputStream)
maiDataInputStreamDemo()
function maiDataInputStreamDemo(){
is = null;
dis = null;
fos = null;
dos = null;
// intArr = [1,1,1,1,1,1,1,1,1,1,1]
intArr=[
-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,
-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,
-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,
-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,
-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,
-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,
-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111,-1111111
]
try{
// create file output stream
fos = new FileOutputStream("/sdcard/javaInt数组");
// create data output stream
dos = new DataOutputStream(fos);
// for each byte in the buffer
intArr.map(function (item) {
dos.writeInt(item);
})
// force bytes to the underlying stream
dos.flush();
// create file input stream
is = new FileInputStream("/sdcard/javaInt数组");
// create new data input stream
dis = new DataInputStream(is);
// read till end of the stream
while(dis.available()>0)
{
// read character
c = dis.readInt();
// print
log(c + " ");
}
}catch(e){
// if any I/O error occurs
log(e)
}finally{
// releases all system resources from the streams
if(is!=null)
is.close();
if(dos!=null)
is.close();
if(dis!=null)
dis.close();
if(fos!=null)
fos.close();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
AutoJs源码-写整数数组到文件
共1个文件
js:1个
需积分: 1 0 下载量 101 浏览量
2022-11-15
09:42:02
上传
评论
收藏 777B 7Z 举报
温馨提示
AutoJs源码-写整数数组到文件。本资源购买前提醒:本源码都是实际autojs项目模板,安装好autojs直接运行即可打开。1、支持低版本autojs。2、资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!。3、安装过程详见具体资源,不会使用autojs谨慎下载
资源推荐
资源详情
资源评论
收起资源包目录
AutoJs源码-写整数数组到文件.7z (1个子文件)
AutoJs源码-写整数数组到文件.js 2KB
共 1 条
- 1
资源评论
[虚幻私塾】
- 粉丝: 335
- 资源: 1559
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功