3
私はFTPCLientクラスのapache commons net APIを使用してFTPサーバーに接続するプログラムを作成しています。ここにコード:Apache Commons Net APIの使用
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);
}
..... 私はconnect line()で例外が発生します。
org.apache.commons.net.MalformedServerReplyException: Could not parse response code.