Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

GET csv file over HTTPS ?

Posted on 2002-07-25
3
Medium Priority
?
195 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 800 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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.
Suggested Courses

610 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