java客户端发送数据到c语言服务端出现乱码,求解答,下面是主要代码 30
145dataPackage.writeShort(2);146dataPackage.writeInt(requestLen);147dataPackage.write...
145 dataPackage.writeShort(2);
146 dataPackage.writeInt(requestLen);
147 dataPackage.writeChars(file.getParent());
148 dataPackage.writeChars(";");
149 dataPackage.writeChars(file.getName());
150 dataPackage.writeChars(";");
151 dataPackage.writeChars(uploader);
152 dataPackage.writeChars(";");
153 dataPackage.writeLong(fileSize);
154 dataPackage.writeChars(";");
155 dataPackage.writeChars(fileMD5);
156 dataPackage.writeChars(";");
157 dataPackage.writeInt(scanPolicy);
158
159 OutputStream outStream = sock.getOutputStream();
160 outStream.write(reqPackage.toByteArray()); 展开
146 dataPackage.writeInt(requestLen);
147 dataPackage.writeChars(file.getParent());
148 dataPackage.writeChars(";");
149 dataPackage.writeChars(file.getName());
150 dataPackage.writeChars(";");
151 dataPackage.writeChars(uploader);
152 dataPackage.writeChars(";");
153 dataPackage.writeLong(fileSize);
154 dataPackage.writeChars(";");
155 dataPackage.writeChars(fileMD5);
156 dataPackage.writeChars(";");
157 dataPackage.writeInt(scanPolicy);
158
159 OutputStream outStream = sock.getOutputStream();
160 outStream.write(reqPackage.toByteArray()); 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询