LOGGER.info("======== 末尾向效劳端传送源文件" + srcRealPath + " ========");
byte[] bytes = new byte[1024];
long progress = 0L;
int length;
while((length = this.fis.read(bytes, 0, bytes.length)) != -1) {
this.dos.write(bytes, 0, length);
this.dos.flush();
progress += (long)length;
LOGGER.info("| " + 100L * progress / file.length() + "% |");
}
LOGGER.info("======== 文件传输成功 (" + file.length() / 1048576L + ")M========");
this.client.shutdownOutput();
LOGGER.info("======== 末尾转换" + ext + " ========");
InputStream inputStream = this.client.getInputStream();
this.dis = new DataInputStream(inputStream);
String result = this.dis.readUTF();
if ("error".equals(result)) {
String reason = this.dis.readUTF();
LOGGER.info(reason);
code = "500";
message = reason;
} else if ("info".equals(result)) {
long l = this.dis.readLong();
(责任编辑:admin)