INT-1664 renamed copy() methods to read(..) and write(..)
This commit is contained in:
@@ -178,7 +178,7 @@ public class FileTransferringMessageHandler extends AbstractMessageHandler {
|
||||
remoteDirectory += File.separatorChar;
|
||||
}
|
||||
String remoteFilePath = remoteDirectory + file.getName();
|
||||
session.copy(fileInputStream, remoteFilePath);
|
||||
session.write(fileInputStream, remoteFilePath);
|
||||
fileInputStream.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -125,12 +125,12 @@ public class CachingSessionFactory implements SessionFactory, DisposableBean {
|
||||
return this.targetSession.<F>list(path);
|
||||
}
|
||||
|
||||
public void copy(String source, OutputStream os) throws IOException{
|
||||
this.targetSession.copy(source, os);
|
||||
public void read(String source, OutputStream os) throws IOException{
|
||||
this.targetSession.read(source, os);
|
||||
}
|
||||
|
||||
public void copy(InputStream inputStream, String destination) throws IOException{
|
||||
this.targetSession.copy(inputStream, destination);
|
||||
public void write(InputStream inputStream, String destination) throws IOException{
|
||||
this.targetSession.write(inputStream, destination);
|
||||
}
|
||||
|
||||
public boolean isOpen() {
|
||||
|
||||
@@ -35,9 +35,9 @@ public interface Session {
|
||||
|
||||
<F> F[] list(String path) throws IOException;
|
||||
|
||||
void copy(String source, OutputStream outputStream) throws IOException;
|
||||
void read(String source, OutputStream outputStream) throws IOException;
|
||||
|
||||
void copy(InputStream inputStream, String destination) throws IOException;
|
||||
void write(InputStream inputStream, String destination) throws IOException;
|
||||
|
||||
void close();
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ public abstract class AbstractInboundFileSynchronizer<F> implements InboundFileS
|
||||
InputStream inputStream = null;
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(tempFile);
|
||||
try {
|
||||
session.copy(remoteFilePath, fileOutputStream);
|
||||
session.read(remoteFilePath, fileOutputStream);
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (e instanceof RuntimeException){
|
||||
|
||||
Reference in New Issue
Block a user