In trying to get an InputStream on a URL connection (on the base directory),
I tried two types of strings and each threw a different exception.
1.
url = new URL("ftp://" + ftpServerName + "/");
con = url.openConnection();
System.out.println("1");
in = new BufferedReader (new InputStreamReader(con.getInputStream()) );
***************exception here gets thrown****************
FtpProtocolException
'RETR' : 500 command not understood
2. url = new URL("ftp://" + ftpServerName);
con = url.openConnection();
System.out.println("1");
in = new BufferedReader (new InputStreamReader(con.getInputStream()) );
**************exception here gets thrown*************
StringOutOfBoundsException
String index out of range:0
krystyna.polomski@Eng 2001-02-28
b53 behavior change--throws a
sun.net.ftp.FtpProtocolException: CWD :500 'CWD ': command not understood.
for case #1 above.
(no exception thrown for case #2)
I tried two types of strings and each threw a different exception.
1.
url = new URL("ftp://" + ftpServerName + "/");
con = url.openConnection();
System.out.println("1");
in = new BufferedReader (new InputStreamReader(con.getInputStream()) );
***************exception here gets thrown****************
FtpProtocolException
'RETR' : 500 command not understood
2. url = new URL("ftp://" + ftpServerName);
con = url.openConnection();
System.out.println("1");
in = new BufferedReader (new InputStreamReader(con.getInputStream()) );
**************exception here gets thrown*************
StringOutOfBoundsException
String index out of range:0
krystyna.polomski@Eng 2001-02-28
b53 behavior change--throws a
sun.net.ftp.FtpProtocolException: CWD :500 'CWD ': command not understood.
for case #1 above.
(no exception thrown for case #2)