I Want to optimize performance by opening FTP connection once.Can it be possible ?

I am doing as ,

```
public void method1()
{
  for(loop)
  {
    List li = someList;
    method2(li); //Here I am calling this method in loop. This method has code for FTP connection. So for every iteration it is opening FTP connection in method2().
  }
}

public void method2(List li)
{
 open FTP connection // FTP connect code here
 once FTP connection obtained ....do some other stuff...
}

```

Thanks.