Solved

GET csv file over HTTPS ?

Posted on 2002-07-25
3
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

726 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