【发布时间】:2011-01-21 06:55:17
【问题描述】:
我正在制作一个使用 Apache commons net API 的 FTPCLient 类连接到 FTP 服务器的程序。这是代码:
FTPClient client = new FTPClient();
byte[] b = new byte[4];
b[ 0] = new Integer(127).byteValue();
b[ 1] = new Integer(0).byteValue();
b[ 2] = new Integer(0).byteValue();
b[ 3] = new Integer(1).byteValue();
try{
InetAddress address = InetAddress.getByAddress(b);
client.connect(address,22);
}
..... 我在连接线()处遇到异常。
org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
【问题讨论】: