Lines 1201-1220
Link Here
|
1201 |
} |
1201 |
} |
1202 |
} |
1202 |
} |
1203 |
|
1203 |
|
1204 |
FTPClient ftpClient = getFTPClient(); |
|
|
1205 |
|
1206 |
InputStream stream = null; |
1204 |
InputStream stream = null; |
1207 |
|
1205 |
|
1208 |
try { |
1206 |
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) |
1209 |
|
1207 |
{ |
1210 |
setFileType(isBinary); |
1208 |
|
1211 |
|
1209 |
FTPClient ftpClient = getFTPClient(); |
1212 |
stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient); |
1210 |
|
1213 |
} |
1211 |
try { |
1214 |
catch (Exception e) { |
1212 |
|
1215 |
throw new RemoteFileIOException(e); |
1213 |
|
|
|
1214 |
ftpClient.changeWorkingDirectory(remoteParent); |
1215 |
setFileType(isBinary); |
1216 |
stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient); |
1217 |
} |
1218 |
catch (Exception e) { |
1219 |
throw new RemoteFileIOException(e); |
1220 |
}finally { |
1221 |
_commandMutex.release(); |
1222 |
} |
1216 |
} |
1223 |
} |
1217 |
|
1224 |
|
|
|
1225 |
|
1218 |
return stream; |
1226 |
return stream; |
1219 |
} |
1227 |
} |
1220 |
|
1228 |
|
Lines 1232-1251
Link Here
|
1232 |
} |
1240 |
} |
1233 |
} |
1241 |
} |
1234 |
|
1242 |
|
1235 |
FTPClient ftpClient = getFTPClient(); |
|
|
1236 |
|
1237 |
OutputStream stream = null; |
1243 |
OutputStream stream = null; |
1238 |
|
1244 |
|
1239 |
try { |
1245 |
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) |
1240 |
|
1246 |
{ |
1241 |
ftpClient.changeWorkingDirectory(remoteParent); |
1247 |
|
1242 |
|
1248 |
FTPClient ftpClient = getFTPClient(); |
1243 |
setFileType(isBinary); |
|
|
1244 |
|
1249 |
|
1245 |
stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient); |
1250 |
try { |
1246 |
} |
1251 |
|
1247 |
catch (Exception e) { |
1252 |
ftpClient.changeWorkingDirectory(remoteParent); |
1248 |
throw new RemoteFileIOException(e); |
1253 |
setFileType(isBinary); |
|
|
1254 |
stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient); |
1255 |
} |
1256 |
catch (Exception e) { |
1257 |
throw new RemoteFileIOException(e); |
1258 |
}finally { |
1259 |
_commandMutex.release(); |
1260 |
} |
1249 |
} |
1261 |
} |
1250 |
|
1262 |
|
1251 |
return stream; |
1263 |
return stream; |