Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void upload(InputStream inputStream) {
- String filename = "file.txt"
- client = new FTPClient();
- try {
- client.connect("ftpsite");
- client.login("username", "password");
- client.storeFile(filename, inputStream);
- } catch (IOException ioe) {
- ioe.printStackTrace();
- } finally {
- try {
- if (inputStream!= null) {
- inputStream.close();
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement