This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
GetServiceByName.java
Posted by Dan Anderson on June 30, 2001 at 3:17 PM
> > In the C world the call getservbyname() converts > > a service name into it's port number. I wrote a method to search the /etc/services file (or /etc/inet/services or c:\winnt\system32\drivers\etc\services).
It is at
http://www.dan.drydog.com/java/GetServiceByName.java
This isn't a part of Java because someone apparently thought it's a system-dependent function. With all due respect, this is not a system-dependent function. The implementation may be (such as the location of the /etc/services file or whether it's a flat file or database), but the function can be implemented on any system.
Replies:
- thanks! alan polansky July 24, 2001 at 1:45 PM
(0)
|