first the log of the ftp-server
230 Logged on
TYPE I
200 Type set to I
PASV
227 Entering Passive Mode (127,0,0,1,6,4)
RETR foobar.tmp
150 Connection accepted
421 Kicked by Administrator
disconnected
my programm looks like this
public void run() {
try {
out = new OutputStream(new FileOutputStream(/test.tmp));
ftp.connect();
ftp.login(user, password);
ftp.setType(FTPTransferType.BINARY);
ftp.setTransferBufferSize(8388608);
ftp.setConnectMode(FTPConnectMode.PASV);
ftp.setTimeout(10*1000);
//do the transfer
ftp.get(out, filename);
//cleanup
ftp.setType(FTPTransferType.ASCII);
} catch (IOException e) {
} catch (FTPException e) {
} finally {
try {
ftp.quit();
} catch (IOException e1) {
} catch (FTPException e1) {
} finally {
try {
out.close();
} catch (IOException e2) {}
}
if i kick my programm from the ftp-server, as shown in the log
i get an Socketexception that looks like this
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java(Compiled Code))
at java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
at com.enterprisedt.net.ftp.FTPClient.putData(FTPClient.java:1506)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1264)
at com.enterprisedt.net.ftp.FTPClient.put(FTPClient.java:1228)
at MyTest.run(DMAeEDIPut.java:111)