public ClientSendFile(String _authToken,String _senderId,String _targetUserId,
String _filePath,String _fileName,String _fileType) {
authToken = _authToken;
senderId = _senderId;
targetUserId = _targetUserId;
filePath = _filePath;
fileName = _fileName;
fileType = _fileType;
}
@SuppressWarnings("unchecked")
@Override
public void run() {
File file = new File(filePath);
if(!file.exists()){
throw new IllegalArgumentException("file not found by path:"+file.getPath());
}
long fileSize = file.length();
System.out.println(" client send fileSize:" + fileSize);
long time = System.currentTimeMillis();
Socket s = new Socket();
try {
s.connect(new InetSocketAddress("http://122.146.199.154/MSServer/",41000));
OutputStream os = s.getOutputStream();