Solved

GET csv file over HTTPS ?

Posted on 2002-07-25
3
189 Views
Last Modified: 2010-03-31
Hello I need to 1) get a csv file through an HTTPS connection and 2) echo the file back to ensure proper transmission. Where can I find sample code to do this? Or better yet... how do i do this...?

I'd been piecing together some code from reading some google posts.. here's what i have so far( I also downloaded JSSE from sun's site)-->



public void getDataOverSSL(){
try{
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.interal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

URL dataprovider = new URL("https://........");
URLConnection con = dataprovider.openConnection();
con.setDoInput(true);
con.setUseCaches(false);
BufferedReader buf = new BufferedReader(new InputStreamReader(con.getInputStream()));
String line;
while((line = buf.readLine()) != null){


} // end of while loop
}// end of try block
catch(Exception e){
System.err.println("Exception in DataXferHttps.getDataOverSSL");
e.printStackTrace();
}

} // end of getDataOverSSL
0
Comment
Question by:brian_s
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 7178739
> 1) get a csv file through an HTTPS connection

What you're doing looks fine.

> and 2) echo the file back to ensure proper transmission.

Why?  TCP/IP guarantees correct packet delivery afaik.
0
 

Author Comment

by:brian_s
ID: 7179883
objects...

thanks for looking my post(code) over-

our client requested that the file be echoed back?  should I just explain to them that, "TCP/IP guarantees correct packet delivery afaik."


well... as soon as i get the link from the client i'm going to give my code a try-  If it doesn't work and i can't figure it out, i'll post again here.  If it works i'll award you the points for  your time.

Thanks again!
0
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 7181627
> our client requested that the file be echoed back?  
> should I just explain to them that, "TCP/IP guarantees
> correct packet delivery afaik."

It would probably be worth discussing with them to determine their exact reasons for this. Personally I'd consider it unnecessary if the purpose is to confirm correct delivery. Maybe suggests sending a checksum if there are concerns. But in the end it's up to the client what they want.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question