Networking Section Index | Page 2
How can I parse a URL?
The URL class contains a variety of accessor methods, which return
the values of a URL's components. URL's use of accesors makes having
to parse a URL to gain this information a thing of the pa...more
How can I obtain an IP address from a host name?
The InetAddress class gives the programmer a solution to this problem through a process called resolution. When an IP address is obtained from an host name we call this Host Name Resolution with ...more
What is a URL and how can I construct one?
A URL (Uniform Resource Locator) represents a reference to resource on a network. The resource may take many forms. Maybe it is an image stored on a web server of that sports car youve been dream...more
How can I access an NNTP newsgroup using JSP or Servlets?
Your servlet must know how to speak NNTP, or call a library that does.
There are NNTP implementation in the following packages:
JavaMail: See the JavaMail:NNTP FAQ subtopic.
Jakarta Commons...more
I'm looking for information on how to write a java program that uses a http url connection object to request data from a servlet... however, I don't want to construct a new tcp/ip connection every time I create a request.
I'm looking for information on how to write a java program that uses a http url connection object to request data from a servlet... however, I don't want to construct a new tcp/ip connection every ...more
Java application can't estabilish network connection, if the connection came up after application start. First I'm running a the java program below with no network connection. While the program running, the network connection came up, but the application can't reach it, why?
Java application can't estabilish network connection, if the connection came up after application start. First I'm running a the java program below with no network connection. While the program run...more
HttpUrlConnection headache and the TIMEOUT
HttpUrlConnection headache and the TIMEOUT
I have many links(urls) to be checked for their activeness.
I want to set a timeout and check whether urls response within the timeout.
My final goal i...more
I am using URLConnection to simulate a browser HTTP POST. However, the website (ebay) claims I cannot accept cookies? I have tried setting the "User-Agent", "Referer" fields etc...What am I doing wrong? How do I accept cookies? A code sample would be much appreciated.
I am using URLConnection to simulate a browser HTTP POST. However, the website (ebay) claims I cannot accept cookies? I have tried setting the "User-Agent", "Referer" fields etc...What am I doin...more
I want to interrupt an accept()-operation on a ServerSocketChannel with jdk14.
I want to interrupt an accept()-operation on a ServerSocketChannel with jdk14. But issueing an interrupt() blocks.
here is a test program demonstrating this:
import java.net.*;
import java.nio.*;...more
A SocketChannel that has registered with the Selector showing interest in both OP_READ and OP_WRITE
A SocketChannel that has registered with the Selector showing interest in both OP_READ|OP_WRITE I would expect the select() method to continously return showing that the channel isWritable() until ...more
This doubt has been there in my mind regarding socket-port relationship that whether a port is associated with only one unique socket object or multiple socket objects can be associated with a single port?
This doubt has been there in my mind regarding socket-port relationship that
whether a port is associated with only one unique socket object or multiple socket objects can be associated with a sing...more
In Java, is there any way of getting all the IP addresses associated with a multi-homed system?
Support has been added in JDK1.4.
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;
public class Addrs {
...more
Here is my question: I have a java serversocket application staying on a windows machine, and listening a certain port say 1111. Can I using other window's application (written in Delphi, for example) to connect this java socket and send information to, or receive response from this java application? I tried, however, I can't read anything from a client( written in Delphi).
It shouldn't make a difference what language you write your server/clients in so long as they use TCP/IP sockets. Are you sure that you are not, for example, trying to create a server socket on bo...more
I was wondering if anyone had any ideas on if or how you can implement bandwidth throttling with java?
I was wondering if anyone had any ideas on if or how you can implement bandwidth throttling with java? To clarify, how can I give my app the ability to give itself more or less of the available in...more
I need to build a small application to detect a ftp server's operating system and also it's server. Until now, I can only detect a web server's server but not the operating system (and not a ftp server :( ). Can anyone help me out?
You have to check for port 21 to see whether a FTP server exists on a host. You can connect to that port and then use the 'SYST' command. For more details check out RFC 959 more