项目中,常常需要用到文件的上传和下载,上传和下载功能实际上是对Document对象进行insert和查询操作.本篇演示简单的文件上传和下载,理论上文件上传后应该将ID作为操作表的字段存储,这里只演示文件上传到Document对象中. 一.文件上传功能 apex代码 public with sharing class FileUploadUsedTransientController { public transient Blob fileUploadBody{get;set;} public S…
//TCP客户端public class TCPClient { public static void main(String[] args)throws IOException { Socket socket = new Socket("127.0.0.1",8888); OutputStream out = socket.getOutputStream(); FileInputStream fis = new FileInputStream("d:\\jay.jpg&qu…