Do you need to do this from within a program(of your own writing)?
Just filtering the obvious, but if you can use an existing SFTP program for your needs, do.
That being said, while Java does excel at automation, I don't know if it goes as far as giving you ready-made SFTP. More likely, you're going to have to either:
1. Learn the SFTP protocol and implement it yourself using sockets.
or
2. Find a ready-made Java package for using SFTP. It's not too unlikely someone somewhere made one for whatever purpose. You'll, of course, be bound by whatever license said someone released said package under.
Regardless of which of the above you choose, you're going to have to start with Google. Either search for a description of SFTP, or for a Java package for SFTP.