dcsimg
I want to transfer 3-5MB of XMl file through leased line connection. What is the best reliable API should I use.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shirish_Dalal
Posted On:   Wednesday, August 1, 2001 11:49 PM

I need to Transfer 3-5MB of XML file using java URL Connection. Currently I am transfering as a URL url = new URL("http://ipaddress:5000/"); HttpURLConnection connection = (HttpURLConnection)url.openConnection(); connection.setDoOutput(true); connection.setRequestMethod("POST"); PrintStream out = new PrintStream(new BufferedOutputStream(connection.getOutputStream())); out.println("XmlFile Content"); and getting it using the socket server program as follows. ServerSocket server = new ServerSocket(5000); Socket client = server.accept (); String xmlData="&qu   More>>

I need to Transfer 3-5MB of XML file using java URL Connection.


Currently I am transfering as a


URL url = new URL("http://ipaddress:5000/");


HttpURLConnection connection = (HttpURLConnection)url.openConnection();


connection.setDoOutput(true);

connection.setRequestMethod("POST");

PrintStream out = new PrintStream(new BufferedOutputStream(connection.getOutputStream()));


out.println("XmlFile Content");


and getting it using the socket server program as follows.



ServerSocket server = new ServerSocket(5000);

Socket client = server.accept ();

String xmlData="";

BufferedReader reader = new BufferedReader(new InputStreamReader(client.getInputStream()));


while(String inputLine = reader.readLine())

{

xmlData +=inputLine;

}


Is it reliable to transfer a file with 5MB size through above commands.


Please reply urgently.

   <<Less

Re: I want to transfer 3-5MB of XMl file through leased line connection. What is the best reliable API should I use.

Posted By:   Anonymous  
Posted On:   Monday, August 6, 2001 06:17 PM

I suggest you to take a look at this thread: http://www.jguru.com/forums/view.jsp?EID=426376.

Regards.
About | Sitemap | Contact