brian_s
asked on
GET csv file over HTTPS ?
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.p rotocol.ha ndler.pkgs ","com.sun .net.ssl.i nteral.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.s sl.Provide r());
URL dataprovider = new URL("https://........");
URLConnection con = dataprovider.openConnectio n();
con.setDoInput(true);
con.setUseCaches(false);
BufferedReader buf = new BufferedReader(new InputStreamReader(con.getI nputStream ()));
String line;
while((line = buf.readLine()) != null){
} // end of while loop
}// end of try block
catch(Exception e){
System.err.println("Except ion in DataXferHttps.getDataOverS SL");
e.printStackTrace();
}
} // end of getDataOverSSL
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.p
Security.addProvider(new com.sun.net.ssl.internal.s
URL dataprovider = new URL("https://........");
URLConnection con = dataprovider.openConnectio
con.setDoInput(true);
con.setUseCaches(false);
BufferedReader buf = new BufferedReader(new InputStreamReader(con.getI
String line;
while((line = buf.readLine()) != null){
} // end of while loop
}// end of try block
catch(Exception e){
System.err.println("Except
e.printStackTrace();
}
} // end of getDataOverSSL
ASKER
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!
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!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What you're doing looks fine.
> and 2) echo the file back to ensure proper transmission.
Why? TCP/IP guarantees correct packet delivery afaik.