图片下载预览

1,图片展示

value=http://dccx-oss.oss-cn-shanghai.aliyuncs.com/DCCX_APP8161.png

2,按钮
formatter: function(value, row, index) {
var actions = [];
actions.push('编辑 ');
actions.push(‘删除 ‘);
actions.push(‘重置’);
return actions.join(’’);
}
'反编译

3,
uploadPlug.create("#picker", $(’#portrait_show’), $(’#pic’));

function del(target) {
$("#file").attr(“disabled”, false);
( ( ((target).parent().parent()).remove();
}
var uploadPlug = {
create: function (picker) {
var uploader = WebUploader.create({
pick: picker,//图片选择琪
auto: true,//自动上传
server: g.ctx + ‘/file’,//服务器地址
fileSingleSizeLimit: 2 * 1024 * 1024,
duplicate: true,
accept: {
title: ‘图片文件’,
extensions: ‘gif,jpg,jpeg,bmp,png’
}
});
uploader.on(‘uploadSuccess’, function (file, data) {
var html = tpl.bind($(’#imageTmp’), {path: data.data.path});
$(’#imageList’).append(html);
$("#file").attr(“disabled”, “disabled”);
layer.closeAll(‘page’);
});
uploader.on(‘error’, function (errorCode, limitSize, file) {
if (errorCode == ‘F_EXCEED_SIZE’) {
layer.closeAll();
layer.alert(‘请上传2M以内头像’,
{ico: 2}
)
} else if (errorCode == ‘Q_TYPE_DENIED’) {
layer.closeAll();
layer.alert(‘请上传图片文件’,
{ico: 2}
)
}
});
uploader.on(‘uploadProgress’, function (a, b, c) {
$(’#uploadProgress’).css(“width”, (b * 100) + ‘%’);
});
uploader.on(‘uploadBeforeSend’, function (a, b, c) {
layer.open({
type: 1,
title: false,
closeBtn: 0, //不显示关闭按钮
shift: 2,
shadeClose: false, //开启遮罩关闭
area: [‘100px’, ‘20px’], //宽高
content: ‘

’ +
’ +
40% Complete (success)’ +

});
});
}
};

Java文件读写操作指定编码方式。。。。。
读:

File file=new File(this.filePath);
BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(file),“utf-8”));

String line=null;
while((line=br.readLine())!=null){
if(!line.trim().equals("")){
if(checkDuplicateRow(line.trim()))
tempList.add(line.trim());
}
}

写:

File filename = new File(“xxx”);
filename.createNewFile();
FileWriter fw = new FileWriter(filename);
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename),“GBk”)));
out.write(hexToString(search_result));
out.flush();
out.close();

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值