sourceid()接分
谢谢您的提示 。
相关推荐
sqlserver 存储过程中If Else的用法实例
为大家介绍sql server存储过程中if esle的用法,供大家学习参考。数据库中有两张表,A表主键为自动增长的并且是B表的外键且允许为空
SMTC-Screen Capturing-crx插件
捕获全屏或特定应用程序的屏幕! 此WebRTC屏幕捕获扩展可以在所有域中的所有WebRTC应用程序中使用:)它仅捕获屏幕并返回sourceId。 您的应用程序可以使用该sourceId来使用屏幕流。 支持语言:English (United States)
android 上传文件
android 上传文件 progressBar.setMax((int)file.length()); String sourceid = fileService.find(file); Socket socket = new Socket("192.168.1.157", 7878); OutputStream outStream = socket.getOutputStream(); String head = "Content-Length="+ file.length() + ";filename="+ file.getName() + ";sourceid="+ (sourceid==null? "" : sourceid)+"\r\n"; outStream.write(head.getBytes()); PushbackInputStream inStream = new PushbackInputStream(socket.getInputStream()); String response = StreamTool.readLine(inStream); System.out.println(response); String[] items = response.split(";"); String id = items[0].substring(items[0].indexOf("=")+1);//服务返回绑定该文件的资源id String position = items[1].substring(items[1].indexOf("=")+1); if(sourceid==null) fileService.save(file, id); RandomAccessFile fileOutStream = new RandomAccessFile(file, "r"); fileOutStream.seek(Integer.valueOf(position)); byte[] buffer = new byte[1024]; int len = -1; int length = Integer.valueOf(position); while( (len = fileOutStream.read(buffer)) != -1){ outStream.write(buffer, 0, len); length += len; Message msg = new Message(); msg.getData().putInt("size", length); handler.sendMessage(msg); } fileOutStream.close(); outStream.close(); inStream.close(); socket.close(); if(length==file.length()) fileService.delete(file);
Ajax实现图片上传并预览功能
主要介绍了Ajax实现图片上传并预览,需要的朋友可以参考下
DBUtils操作数据库以及事物的管理
DBUtils操作数据库以及事物的管理


