1 - IntroToNetProgramming
1 - IntroToNetProgramming
1
Introduction to Java Network
Programmning
2
Introduction
◼ Computer networking has grown explosively
◼ Advertising
◼ Production
◼ Shipping
◼ Planning
◼ Billing
◼ Accounting
PC client
Internet
Server
Local Area Network
Client
Server
Network
Client machine
Server machine
Client
port 80 Web Service
Socket Socket
Server
◼ 20 : FTP (Data)
◼ 21 : FTP
◼ 23 : Telnet
◼ 25 : SMTP
◼ 43 : Whois
◼ 53 : DNS
◼ 80 : HTTP
◼ 110 : POP3
◼ 1099 : RMI
◼ protocol://host[:port][/path/][file][#anchor]
◼ http://www.javasoft.com/sfaq/index.html
◼ http://www.javasoft.com/sfaq/
◼ ftp://ftp.stinky.com/pub/java/course.zip
18
Java File and Folder
◼ An abstract representation of file and directory
pathnames.
◼ For UNIX platforms, the prefix of an absolute
pathname is always "/". Relative pathnames have no
prefix.
◼ For Microsoft Windows platforms, the prefix of a
pathname that contains a drive specifier consists of
the drive letter followed by ":" and possibly followed
by "\\" if the pathname is absolute. A relative
pathname that does not specify a drive has no prefix.
◼ Examples:
◼ “D:\\TMP\\t.txt”
◼ “t.txt”
pathname is a directory.
◼ public boolean isFile()