Uploading and downloadingdata to a directory on a server.

by bigauto » Fri, 13 Mar 2009 10:25:01 GMT


Sponsored Links
 Hi, I was wondering if there is a simple way to upload and download
data to and from a directory in a server. If I have load and download
from a directory at  http://server.com/filedir , How should I go about
sending the data to a server and giving it a name so that I could
download the same data later? I wrote a method before with java that
saves an arraylist to and from my own pc like this

String filename = "userlist.dat";
                String directory = "dat";

                FileOutputStream fos = null;
                ObjectOutputStream out = null;

                try {
                        fos = new 
FileOutputStream(directory+File.separator+filename);
                        out = new ObjectOutputStream(fos);
                        out.writeObject(userlist); /////The arrayList 
(userlist) I wanted
to save
                        out.close();
                        fos.close();
                }
                catch(IOException ex){
                        System.out.println("saving list error");
                }

I was wondering if there is a similar method as that.
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Development Platform Compatibility

Hi,
I am getting a new OS, which OS is Android SDK/IDE development
environment compatible with XP64, Vista64 or Windows7? Or Do I need to
keep a XP32 partition around?
--~--~---------~--~----~------------~-------~--~----~

2. file handling in android.

Hi,

I am new to this android platform. Could someone tell me how does
android deal with file handling?

Thanks and Regards.
--~--~---------~--~----~------------~-------~--~----~

3. Contact change broadcast

4. Has anyone sold to users in the UK?

5. Weekend Project: Fruits of my labour ...

6. Fwd: Soft Keyboard in Landscape Configuration

7. Copy protected app issue