filename = path.substring(lsi + 1); path = path.substring(0, lsi); if (!connection.changeWorkingDirectory(path)) { throw new FileNotFoundException(path); } } if (filename != null && filename.length() > 0) { return this.new ClosingInputStream(connection.retrieve(filename));
return this.new ClosingInputStream(connection.list(null));
  public InputStream getInputStream()    throws IOException  {    if (!connected)      {        connect();      }    String path = url.getPath();    String filename = null;    int lsi = path.lastIndexOf('/');    if (lsi != -1)      {        filename = path.substring(lsi + 1);        path = path.substring(0, lsi);        if (!connection.changeWorkingDirectory(path))          {            throw new FileNotFoundException(path);          }      }    if (filename != null && filename.length() > 0)      {        return this.new ClosingInputStream(connection.retrieve(filename));      }    else      {        return this.new ClosingInputStream(connection.list(null));      }  }