Below I have a snipit of code which is supposed to place the file "test_transfer.txt" on the specified host. However, I am getting the following error and I don't know why. I can transfer the file, without problems, through a regular FTP program.
If anyone can point out what I am not seeing please do so. Also, I am required to use the FtpClient Class.
I'm not sure why this would cause the error you are seeing, butproduces a String that contains "C", ":", tab character, "e", "s" and so on. That's because "\t" is the Java escape for the tab character. What you want is to escape the backslash so it comes out as itself:
Joined: Nov 07, 2005
The problem I was having was that the FtpClient.put method returns an OutputStream, which I was doing nothing with.
Below is the code where I'm actually working with that OutputStream. However, now the file is getting created on the server, but the text inside the file is not getting transfered.
Any ideas? Thanks.
osTestTransfer = client.put("test_transfer.txt"); bosTestTransfer = new BufferedOutputStream(osTestTransfer);