LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-30-2005, 03:49 AM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
java URLConnection: setDoIn/Output() vs connect()


In some programs both "connect" and "setDoIn/Output" methods are used, but in others only the former one is used.

I have understood that "connect" =="setDoInput" plus "setDoOutput" , called on the same object. But that's not true, according to to their use in programs. Which is their relation? Which is the difference?
 
Old 07-30-2005, 03:55 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I haven't used URLConnection before, but look at the API documentation for the class here, as it explains all the methods
 
Old 07-30-2005, 05:36 AM   #3
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Original Poster
Rep: Reputation: 30
I had seen it, but still can't get it.
 
Old 01-14-2018, 08:56 PM   #4
mount.nfs
Member
 
Registered: Feb 2017
Posts: 59

Rep: Reputation: Disabled
Code:
import java.net.URL;
import java.net.URLConnection;

URL myURL = new URL("http://localhost:8080");
URLConnection c = myURL.openConnection();
 
Old 01-14-2018, 09:15 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
You have opened a 12 year dead thread.

If you have a similar problem it is preferred that you open your own thread with a description of your specific problem.

Please review the Site FAQ for guidance in posting your questions and general forum usage.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java: Encoding a visual object to JPEG (and output to a OutputStream) eantoranz Programming 0 11-16-2004 12:41 PM
squares in java application output text debikkel Linux - Software 1 08-31-2004 03:04 PM
How can I output realtime system resources to a label or textarea? JAVA randomx Programming 6 07-15-2004 06:41 PM
Programming a Connect Four UI (Java) lambada Programming 5 11-10-2003 09:58 PM
how to tell if my install is blocking a java URLConnection complus Linux - Newbie 1 10-06-2003 03:57 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration