Java Network Programming Index
Symbols
& (ampersand) in query strings, 97
= (equal sign) in query strings, 97
% (percent sign) in encoded URLs, 94
# in URLs, 35
" (quotation marks) in tags, 37
/ (slash) for document root, 36
Numbers
128-bit addresses, 57
A
ABORT constant (ImageObserver), 121
ABORTED constant (MediaTracker), 130
absolute URLs, 36, 82
getting from virtual paths, 392
Accept keyword (HTTP), 39
accept( ), 189-191
SO_TIMEOUT option and, 193
addImage( ), 124
addresses (see IP addresses)
Admin servlet, 378
agents, intelligent, 9-11, 377
ALLBITS constant (ImageObserver), 120-121
allowUserInteraction field, 257
ampersand (&) in query strings, 97
analog-to-digital conversion, 15
anchors, named, 35, 85, 93
animation player (example application), 139
API, Java Server, 375-379
Applet class, downloading data with, 109-117
Applet Host security level, 54
<APPLET> tags (HTML), 51
AppleTalk, 13
AppletContext class, 110-111, 131-133
applets, 51-55, 109, 375
downloading (example), 274
URLs for, 110
(see also servlets)
AppletStub class, 110
application/ content types, 45-48, 264
application/octet-stream, 52
application/x-time, 312
application/x-www-form-urlencoded, 95, 276
application layer, 14, 17
application servers, 25
applications, 51
client-server model, 25
consumer, 7, 10
future, 7-8
search, 8
(see also applets)
audio/ content types, 46, 48, 265
(see also sounds)
AudioClip object, 115-117
authentication, 398
B
base directive, 379
billing (see electronic commerce)
binary data from HTTP connections, 267
BindException, 169
binding names to remote objects, 361-363
bind( ), 362, 368
BITPIX keyword (FITS), 314
_blank target string, 132
broadcasting, 325
buffering socket data, 168
bugs
getContentLength( ), 249
reverse DNS lookup, 67
ByteArrayInputStream object, 219
C
caching (see saving)
case sensitivity of tags, 37
CGI (Common Gateway Interface), 48-51
programs, communicating with, 103
servlets versus, 376
CgiServlet servlet, 378
channels, 43
Character Generator Protocol, 31
chargen protocol, 288-296
chat rooms, 6
checkAll( ), 126
checkID( ), 125-126
checking
clients (example program), 195-198
download status, 117-122, 125-126
for errors (see errors)
input, 5
servers with telnet, 161-165
class A address blocks, 22
class B address blocks, 22
class C address blocks, 22
class D address blocks, 22, 329
class E address blocks, 22, 329
classes
loading over networks, 269-276
serialization and, 350
ClassLoader class, 269
ClassLoader object, 52-53
CLASSPATH variable, 53
clickable image maps, 141-147, 378
clients
allowing input/output, 259
remote, getting information on, 371
RMI and, 352, 358
testing (example program), 195-198
UDP echo (example), 240-243
UDP, examples of, 233-236
client-server model, 25
clone( ), 371, 373
close( )
DatagramSocket class, 228
ServerSocket class, 191
Socket class, 165-166, 168
closing
DatagramSocket objects, 228
handling unsent datagrams, 168
server sockets, 191
sockets, 165-166
CODE attribute (<SERVLET> tag), 382
codebase, 110
CODEBASE attribute (HTML), 52
collaboration online, 6
commerce, online, 7, 10
Common Gateway Interface (see CGI)
Common Object Request Broker Architecture (CORBA), 351
communicating, 5
with CGI programs, 103
client-server, 25
with multicast groups, 339-342
peer-to-peer connections, 5, 26
comparing
IP addresses, 65
URLs, 91, 93
compiling servlets, 381
COMPLETE constant (MediaTracker), 130
connected field (URLConnection class), 257
ConnectException, 169
connection trees, 326
connections, 89
accepting/closing server sockets, 189-191
full-duplex, 150
openConnection( ), 89, 245, 287
peer-to-peer, 5, 26
(see also sockets)
connect( ), 245-246
constants
ImageObserver class, 120
media status, 129
constructors
for DatagramPacket objects, 214, 221-224
for MediaClip object, 124
for multicast sockets, 338
for server sockets, 186-189
for sockets, 152-158
for URL objects, 79-83
consumer applications, 7, 10
content handlers, 303-306
for application/x-time (example), 312
headers and, 307
for image/x-fits (example), 313-324
content types, 44-48
determining, 264-267
getContent( ) and, 89-91, 246
obtaining, 249
ContentHandler class, 306-309
ContentHandlerFactory object, 53, 263, 304, 310-312
Content-length header line, 386
Content-type header line, 30, 90, 249, 386
converting
digital/analog, 15
IP addresses to names, 67-71
MIME header field data, 254
virtual to absolute paths, 392
copying objects, 349
CORBA (Common Object Request Broker Architecture), 351
Counter servlet (example), 383
createContentHandler( ), 310
createRegistry( ), 370
createURLStreamHandler( ), 292-296
creating URLs, 79-84
customizing
HTTP servers, 198-211
servers, 7
D
data link layer, 16
DatagramPacket( ), 215-217, 221-224
DatagramPacket class, 214-220
datagrams, 16, 149
handling unsent, 168
multicast, 334
sending and receiving, 224-228
size of, 215, 219, 226
UDP (see UDP)
(see also sockets)
DatagramSocket class, 213, 221-229
socket options, 228
DataInputStream object, 87, 161
DataOutputStream object, 163, 248
date (see time and date)
daytime protocol, 20, 31, 161
protocol handler for (example), 297-301
UDP server for (example), 239
decoding encoded URLs, 96
defaultAllowUserInteraction field, 258
defaultUseCaches field, 263
defineClass( ), 52
destroy( ), 380, 391
DHCP (Dynamic Host Configuration Protocol), 330
digital-to-analog conversion, 15
disabling caching, 263
discard protocol, 20, 31
displaying data, 2
Distance Vector Multicast Routing Protocol (DVMRP), 330
DNS (Domain Name System), 19, 31, 56-57
document base, 110
document root (/), 36
doInput field, 259
domain name server, 57
Domain Name System (see DNS)
doOutput field, 260
double quotation marks (") in tags, 37
downloading, 2-4
applets (example), 274
with Applet class, 109-117
binary data with HTTP, 267
classes from network, 269-276
document transmission date, 250
images, 111-113
from servers, 246
sounds, 113-117
status reports for, 117-122, 125-126, 129
from URLs, 78, 86-91
waiting for, 126
Web pages, 87, 104-108, 247
draft standards, 28
drawImage( ), 118, 120
DVMRP (Distance Vector Multicast Routing Protocol), 330
Dynamic Host Configuration Protocol (DHCP), 330
E
echo protocol, 20, 31, 163
UDP client/server for (example), 238, 240-243
elective RFCs, 29
electronic commerce, 7, 10
electronic mail, standards for, 30
(see also MIME)
encapsulation, 17
encode( ), 95
encoding
determining method of, 249
URL characters, 94-97
equal sign (=) in query strings, 97
equals( )
InetAddress class, 65
RemoteObject class, 371
URL class, 93
ERROR constant (ImageObserver), 121
error correction, 16
ERRORED constant (MediaTracker), 130
errors
HTTP response codes for, 42, 401, 404
Image object, 128
setError( ), 404
Ethernet, 13
examples in book, xii
exceptions, 128
java.rmi.server package, 373
remote, 366-368
socket-related, 169
(see also under specific exception)
exec( ), 53
experimental protocols, 28
expiration dates, document, 250
ExportException, 373
exportObj( ), 373
extensions
HTML, 38
URL, and content types, 264
extra path information, 395
F
field name, MIME header, 253
file servers (see servers)
File Transfer Protocol) (see FTP)
filenames in URLs, 35
files
binary, downloading, 267
FITS, 313
image (see images)
server for only one, 198-202
sound (see sounds)
storing, 4
FileServlet servlet, 378
FileURLConnection object, 252
finalize( ), 229
finger protocol, 20, 30, 170-172
firewalls, 23-25
FITS (Flexible Image Transport System), 313-324
forms, 49, 276-280
parsing with servlet (example), 405
smart, 5
(see also CGI)
fragments, URL, 35, 85, 93
FRAMEBITS constant (ImageObserver), 121
FTP (File Transfer Protocol), 20, 26
ftp-data protocol, 20
full-duplex connection, 150
future
of HTML, 38
of HTTP, 43
of Java, 7-8
supportable image formats, 112
G
games, 6
garbage collection, 229
GenericServlet class, 380, 389
GenericServlet( ), 389
GET keyword (HTTP), 39
GET method (CGI), 50, 259
getAddress( )
DatagramPocket class, 218
InetAddress class, 64-65
getAllByName( ), 61-62
getAllowUserInteraction( ), 257
getAudioClip( ), 115-117
getAuthType( ), 398
getByName( ), 59-61
getClientHost( ), 371
getClientPort( ), 371
getCodeBase( ), 83, 110
getContent( )
URL class, 89-91, 104, 284
URLConnection class, 246, 304, 307-309
getContentEncoding( ), 249
getContentLength( )
ServletRequest interface), 386
URLConnection class, 249
getContentType( )
ServletRequest interface), 386
URLConnection class, 249
getData( ), 218
getDate( ), 250
getDateHeader( ), 397
getDefaultAllowUserInteraction( ), 258
getDefaultRequestProperty( ), 255
getDefaultToolkit( ), xv
getDefaultUseCaches( ), 263
getDocumentBase( ), 83, 110, 113
getDoInput( ), 259
getDoOutput( ), 260
getErrorsAny( ), 129
getErrorsID( ), 129
getFile( ), 85
getHeader( ), 397
getHeaderField( ), 252-253
getHeaderFieldDate( ), 254
getHeaderFieldInt( ), 254
getHeaderFieldKey( ), 253
getHeaderName( ), 398
getHost( ), 84
getHostname( ), 63
getIfModifiedSince( ), 261
getImage( ), 111-113
getInetAddress( )
ServerSocket class, 191
Socket class, 158
getInitParameter( )
GenericServlet interface, 382, 389
ServerStub interface, 393
getInitParameters( )
GenericServlet interface, 382, 389
ServletStub interface, 393
getInputStream( )
ServletRequest interface, 387
Socket class, 161
URLConnection class, 247
getInterface( ), 342
getIntHeader( ), 397
getLastModified( ), 250
getLength( ), 219
getLocalAddress( ), 160
getLocalHost( ), 62
getLocalPort( )
DatagramSocket class, 227
ServerSocket class, 192
Socket class, 159
getLog( ), 372
getMethod( ), 394
getMimeType( ), 392
getOutputStream( ), 388
Socket class, 163-165
URLConnection class, 248
getParameter( ), 383, 387
getParameters( ), 383, 388
getPathInfo( ), 395
getPathTranslated( ), 395
getPort( )
DatagramPacket class, 218
Socket class, 159
URL class, 84
getProperty( ), 53
getProtocol( )
ServletRequest interface, 386
URL class, 84
getQueryParameter( ), 395
getQueryParameters( ), 397
getQueryString( ), 395
getRealPath( ), 392
getRef( ), 85
getRegistry( ), 369
getRemoteAdr( ), 387
getRemoteHost( ), 387
getRemoteUser( ), 398
getRequestProperty( ), 255
getRequestURI( ), 394
getSecurityContext( ), 364
getServerInfo( ), 392
getServerName( ), 386
getServlet( ), 391
getServletContext( )
GenericServlet interface, 391
ServletStub interface, 393
getServletInfo( ), 390
getServletPath( ), 395
getServlets( ), 391
getSoLinger( ), 168
getSoTimeout( )
DatagramSocket class, 229
ServerSocket class, 193
Socket class, 169
getTcpNoDelay( ), 168
getting (see downloading; obtaining)
getURL( ), 256
getUseCaches( ), 262
GIF image format, 44, 112
graphical whois client (example), 177
graphics (see images)
groups, multicast, 329, 339-342
guessContentTypeFromName( ), 264
guessContentTypeFromStream( ), 266
H
handling
content (see content handlers)
errors (see errors)
protocols (see protocol handlers)
unsent datagrams, 168
hashCode( )
InetAddress class, 66
RemoteObject class, 371
URL class, 94
headers
content handlers and, 307
Content-length, 386
Content-type, 30, 90, 249, 386
datagram (packet), 16, 149
FITS files, 314
getting values of, 397
MIME, 248-254, 264-267
User-Agent, 39
HEIGHT constant (ImageObserver), 121
historic RFCs, 29
hostnames, 19, 56
converting IP addresses to, 67-71
versus network addresses, 61
obtaining, 63
specified in URLs, 35, 84
hosts, 12
addresses (see IP addresses)
multicast groups, 329, 339-342
multihoming (see multihoming)
networking between (see RMI)
host-to-network layer, 14-16
HotJava, 54
HTML (Hypertext Markup Language), 33, 36-38
<APPLET> tags, 51
CODE attribute, 382
CODEBASE attribute, 52
forms, 49
NAME attribute, 382
<PARAM> tags, 382
<SERVLET> tags, 382
HTTP (Hypertext Transfer Protocol), 20, 33, 38-43
custom servers, 198-211
HTTP-NG (HTTP Next Generation), 43
java.servlet.http package, 393-407
redirector server, 202-207
response codes, 41-43, 75, 399
saving binary data over, 267
standards for, 32
HttpServlet class, 380
HttpServletRequest interface, 394-398
HttpServletResponse interface, 399-405
HttpURLConnection object, 252
HttpUtils interface, 405
Hypertext Markup Language (see HTML)
Hypertext Transfer Protocol (see HTTP)
I
IANA (Internet Assigned Numbers Authority), 29, 330
identifiers (see numbers)
idioms, Java, xiii
IETF (Internet Engineering Taskforce), 27
multicast addresses, 331
ifModifiedSince field, 261
IllegalAccessException, 256
ImagemapServlet servlet, 378
ImageObserver class, 117-122
MediaTracker class versus, 122
ImageProducer object, 89
images
content handler for (example), 313-324
downloading, 111-113
errors and Image objects, 128
image/ content types, 46, 48, 265-266
image/gif, 44
image/jpeg, 44
image maps, 141-147, 378
multiple (see MediaTracker class)
reporting download progress, 117-122
sizing in advance, 134-139
waiting to download, 126
imageUpdate( ), 118-120
implAccept( ), 194
includes, server-side, 382-384
index.html file, 35
InetAddress class, 57-67
closed sockets and, 165
infoflags argument, imageUpdate( ), 120
informational RFCs, 29
init( ), 380, 390
init parameters, servlet, 382, 389, 393
input
allowing to clients, 259
checking, 5
InputStream object, 86, 161, 247
guessing content type and, 266
installing
ContentHandler class, 310
servlets, 381
URLStreamHandler class, 292-296
instantiation, xiii
intelligent agents, 9-11, 377
interacting with users, 257-259
Internet, 21-25
addresses (see IP addresses)
internets/intranets, 21
layer, 14, 16
multicasting on, 328-337
Internet Assigned Numbers Authority (IANA), 29, 330
Internet Drafts, 27
Internet Engineering Taskforce (see IETF)
Internet Network Information Center (InterNIC), 13, 22
Internet Protocol (see IP)
Internet Service Providers (ISPs), 22
InterNIC, 13, 22
InvokeServlet servlet, 378
IP addresses, 13, 19, 56-57
address blocks, 22, 329
applet security and, 53
comparing, 65
converting to names, 67-71
versus hostnames, 61
InterNIC, 13, 22
IPv6 and 128-bit, 57
local, 62
local loopback address, 22
multicast addresses, 328-334
multiple per computer, 61, 147, 160
obtaining, 59-62, 64-65, 218
relating with sockets, 160
remote, obtaining, 387
IP (Internet Protocol), 16-19
addresses (see IP addresses)
multicasting (see multicasting)
IPv6 addresses, 57
isErrorAny( ), 128
isErrorID( ), 129
ISPs (Internet Service Providers), 22
J
Java Electronic Commerce Framework (JECF), 11
Java programming language
future of, 7-8
idioms, xiii
versions of, xi
Java Server API, 375-379
java.rmi package, 360-368
java.rmi.registry package, 368-370
java.rmi.server package, 370-374
java.servlet package, 385-393
java.servlet.http package, 393-407
JECF (Java Electronic Commerce Framework), 11
Jeeves, 21, 207, 378
jhttp (example server program), 207-211
joinGroup( ), 339
JPEG image format, 44, 112
K
key, MIME header fields, 253
L
last modification date, 250, 261
layers
network, 14-17
RMI model, 352
leaveGroup( ), 340
length (see size)
levels
applet network security, 54
network, 14-17
limited-use RFCs, 29
linking names to remote objects, 361-363
list( ), 363, 368
loadClass( ), 52
loading (see downloading)
LOADING constant (MediaTracker), 130
local
caches, 262-263
caching, 24
filesystem, applets and, 53
loopback address, 22
network address, 62
port number, getting, 159, 192, 227
localhost hostname, 22
LocateRegistry class, 369
log( )
ServletContext interface, 392
ServletResponse interface, 390
logging
processing log files, 74-77
remote communications, 372
server events, 390
to servlets, 392
lookup( ), 362, 368
M
machines on networks
hosts (see hosts)
nodes, 12
mailto: protocol, 285, 287
main( ), xiii
MalformedURLException, 79-83
mapping URLs to remote objects, 361-363
marshaling, 355
MBONE (Multicast Backbone), 333
media (see images; sounds)
MediaTracker class, 122-131
downloading and, 125-127, 129
Image object identifiers, 122, 124
MediaTracker( ), 124
messages
error (see errors)
mail (see electronic mail)
message/ content types, 45, 266
methods, static, xiii
MIME (Multipurpose Internet Mail Extensions), 30, 33, 44-48
content types (see content types)
headers, 248-254, 264-267
modification times, 250, 261
Morris Internet worm, 9
mrouters, 336
Multicast Backbone (MBONE), 333
multicasting, xi, 31, 213, 326-337
examples of multicast servers, 342-346
multicast addresses, 328-334
multicast datagrams, 334
multicast groups, 329, 339-342
multicast sockets, 337-342
routers, 335
MulticastSocket( ), 338
MulticastSocket class, 337-342
multihoming, 61, 147
DatagramSocket( ) for, 223
multicast communications and, 341
relating IP addresses with sockets, 160
multipart/ content types, 45
multiple
images (see MediaTracker class)
IP addresses per computer, 61, 147, 160
Multipurpose Internet Mail Extensions (see MIME)
multithreading, servlets and, 384
N
NAME attribute (<SERVLET> tag), 382
named anchors, 35, 85, 93
names
binding to remote objects, 361-363
guessing content type from, 264
header, 398
host (see hostnames)
MIME header fields, 253
server, obtaining, 386
URNs (uniform resource names), 34
Naming class, 361-363
NAXIS header (FITS), 314
NBC multicast addresses, 332
nested HTML/SGML tags, 37
Network News Transfer Protocol (NNTP), 20
networks, 12-17
addresses (see IP addresses)
layers of, 14-17
loading classes from, 269-276
RMI and (see RMI)
NNTP (Network News Transfer Protocol), 20
nodes, 12
noise, signal, 16
None security level, 54
non-routable addresses, 22
NoRouteToHostException, 169
nslookup utility, 71
NullPointerException, xv
numbers
address (see IP addresses)
IANA, 29, 330
MediaTracker image IDs (see MediaTracker class)
port, 19-21
O
object serialization, 349-351
obtaining
content type, 249
data (see downloading)
elements of URLs, 84-86, 284-287
examples in book, xiii
header values, 397
hostnames, 63
information about remote client, 371
IP addresses, 59-62, 64-65, 218
MIME header fields, 252-254
Remote interface, 362
servlet init parameters, 382
socket information, 158-165
URLs, 256
online collaboration, 6
online shopping, 7, 10
openConnection( ), 89, 245, 287
opening
sockets, 89, 245, 287
URLConection objects, 245
openStream( ), 86-88
operating systems and URLs, 94-97
options, socket, 168-169
for DatagramSocket objects, 228
for server sockets, 192
order, loading MediaTracker images, 124
OSI network model, 14
output, allowing to servers, 260
OutputStream object, 163, 248
P
packets, 13, 16, 149
filtering, 23
packet-switching, 13
size of, 215, 219, 226
(see also sockets)
Page Saver application (example), 98
parallel computing, 5
<PARAM> tags (HTML), 382
parameters, servlet, 383, 387
_parent target string, 132
parseQuery( ), 405
parseURL( ), 285-286
parsing
forms, example servlet for, 405
MIME headers, 248-252
query strings, 405
URLs, 84-86, 284-287
passing a reference, 352
paths
extra path information, 395
getRealPath( ), 392
getting images by, 113
servlet, obtaining, 395
specified in URLs, 35, 85
payload, datagram, 149
peer-to-peer connections, 5, 26
percent sign (%) in encoded URLs, 94
permanent multicast addresses, 330
physical layer, 15
PlainSocketImpl object, 167
play( ), 114-115
playing
animation (example application), 139
sounds, 114-115
plug-ins, 303
PNG image format, 112
POP (Post Office Protocol), 20
portability, 9
ports, 19-21
creating multicast socket on, 338
for datagrams, 218
local, getting number of, 159, 192, 227
relating with sockets, 159
specified in URLs, 35, 81, 84
POST method (CGI), 50, 260
sending forms (example), 276-280
Post Office Protocol (POP), 20
pound sign (#) in URLs, 35
precedence, loading MediaTracker images, 124
println( ), toString( ) and, 92
print( ), toString( ) and, 92
priority, loading MediaTracker images, 124
processing Web server logs, 74-77
PROPERTIES constant (ImageObserver), 121
proposed standards, 28
protected constructors
ServerSocket( ), 188
Socket( ), 157
protocol handlers, 280-284
examples of, 296-301
mechanism for, 244
writing, 288-291
protocols, 14, 17
broadcasting and, 325
chargen, 288
daytime, 297-301
development of, 27-32
investigating with telnet, 150-152
mailto:, 285, 287
reliable versus unreliable, 16
specified in URLs, 34, 84
stateless, 40
(see also encapsulation)
prototypes, 27
proxy servers, 24
PUT keyword (HTTP), 40
Q
query strings, 50, 97, 395, 405
quotation marks (") in tags, 37
Quote of the Day protocol, 31
R
read( ), SO_TIMEOUT option and, 169
rebind( ), 363, 368
receive( ), 225, 339
SO_TIMEOUT option and, 228
receiving datagrams, 225-228
redirecting requests, 133, 202-207, 404
Refs., URL (see named anchors)
registries, server, 368-370
Registry interface, 368
REGISTRY_PORT field, 368
RegistryHandler interface, 369
registryImpl( ), 369
registryStub( ), 369
relative URLs, 36, 82
reliable protocols, 16
remote
exceptions, 366-368
objects, 348, 361-363
reference layer, 352
Remote interface, 360
Remote Method Invocation (see RMI)
Remote Procedure Calls (RPC), 348
RemoteObject class, 370
RemoteServer( ), 371
RemoteServer class, 371
UnicastRemoteObject subclass, 355, 371-372
RequestProperty methods, 255
requests for comments (see RFCs)
Resource Reservation Setup Protocol (RSVP), 330
response codes, HTTP, 41-43, 75, 399
retrieving (see downloading; obtaining)
reverse DNS lookup, 60, 67
RFCs (requests for comments), 27-32
RMI (Remote Method Invocation), xi, 20, 347-354
java.rmi package, 360-368
java.rmi.registry package, 368-370
java.rmi.server package, 370-374
rmic utility, 357
RMISecurityManager( ), 364
RMISecurityManager class, 363-366
routers, multicasting and, 335
RPC (Remote Procedure Calls), 348
RSVP (Resource Reservation Setup Protocol), 330
S
sales (see electronic commerce)
sameFile( ), 91, 93
saving
allowing caches, 262-263
binary data from HTTP connections, 267
document expiration dates, 250
file data, 4
local caching, 24
Web pages, 98-103
SC_ response codes (HTTP), 399
schemes (see protocols)
SeaNet project, 331
search applications, 8
security
applets and, 53-55
authentication, 398
firewalls, 23
levels, applet network, 54
logging remote communications, 372
Morris Internet worm, 9
object serialization and, 350
proxy servers, 24
RMI and, 348
RMISecurityManager class, 363-366
servlets, 376
using Socket( ) to improve, 154
SecurityManager object, 53
__self target string, 132
send( )
DatagramSocket class, 224-225
MulticastSocket class, 340
sendError( ), 404
sending, 4, 326
datagrams, 224-228
forms, 276-280
(see also multicasting)
sendRedirect( ), 404
serialization, 349-351
Server API, xii, 375-379
server sockets, 184, 195-211
options for, 192
ServerCloneException, 374
ServerNotActiveException, 373
servers, 3, 6
allowing output to, 260
client-server model, 25
customizing, 7, 198
document expiration dates, 250
domain name, 57
downloading from, 246
example program for, 207-211
java.rmi.server package, 370-374
life cycle of, 185
multicast (see multicasting)
one-file, 198-202
proxy, 24
redirector, 202-207
RMI and, 352, 355-358
RMI registries, 368-370
testing with telnet, 161-165
UDPServer class (example), 236-239
Web, processing logs of, 74-77
server-side includes, 382-384
ServerSocket( ), 186-189
ServerSocket class, 185-194
service( ), 380, 388, 390
service providers (see ISPs)
Servlet interface, 385-393
<SERVLET> tag (HTML), 382
ServletContext interface, 391
ServletInputStream class, 385
ServletOutputStream class, 385
ServletRequest interface, 385-388
ServletResponse interface, 388
servlets, xii, 375-377
java.servlet package, 385-393
java.servlet.http package, 393-407
Jeeves, 378
server-side includes and, 382-384
writing, 379-384
ServletStub interface, 391-392
setAllowUserInteraction( ), 257
setContentHandlerFactory( ), 263
setContentLength( ), 388, 403
setContentType( ), 388, 403
setDateHeader( ), 403
setDefaultAllowUserInteraction( ), 258
setDefaultRequestProperty( ), 255
setDefaultUseCaches( ), 263
setDoInput( ), 259
setDoOutput( ), 248, 260
setError( ), 404
setHeader( ), 403
setIfModifiedSince( ), 261
setInitHeader( ), 403
setInterface( ), 341
setLog( ), 372
setRequestProperty( ), 255
setSocketFactory( ), 194
setSocketImplFactory( ), 167
setSoLinger( ), 168
setSoTimeout( )
DatagramSocket class, 228
ServerSocket class, 193
Socket class, 169
setStatus( ), 402
setStub( ), 391
setTcpNoDelay( ), 168
setURL( ), 287
setURLStreamHandlerFactory( ), 94
setUseCaches( ), 262
SGML (Standard Generalized Markup Language), 36
shopping online, 7, 10
showDocument( ), 131-133
signal noise, 16
Simple Mail Transfer Protocol (see SMTP)
size
datagrams/packets, 215, 219, 226
image, 134-139
SkeletonMismatchException, 374
SkeletonNotFoundException, 374
slash (/) for document root, 36
smart agents, 9-11, 377
smart forms, 5
SMTP (Simple Mail Transfer Protocol), 20, 30
SO_LINGER option, 168
SO_TIMEOUT option, 169, 192, 228
Socket( ), 152-158
Socket class, xi, 152-169
SocketException, 169, 338
SocketImpl class, 167
SocketImplFactory object, 53, 167, 194
sockets, 149-152, 228
closing, 165-166, 168
exceptions, 169
multicast (see multicasting)
obtaining information about, 158-165
opening, 89, 245, 287
options for, 168-169
server sockets, 184-194
for UDP traffic, 158
unicast, 325
(see also DatagramSocket class; ServerSocket class)
SocketSecurityException, 373
SOMEBITS constant (ImageObserver), 121
sounds
audio/ content types, 46, 48, 265
downloading, 113-117
spiders, 8
standards, development of, 27-32
stateless protocols, 40
static methods, xiii
status codes, HTTP, 41-43, 75, 399
status, downloading (see downloading)
statusAll( ), 130
statusID( ), 130
STD numbers, 28
storing (see saving)
streams, guessing content type from, 266
strings, 66
query strings, 50, 395, 405
URL (see URLs)
(see also toString( ))
stubs (RMI), 352, 363
switching, 13
T
tags, HTML (and SGML), 37-38
TCP_DELAY option, 168
TCP (Transmission Control Protocol), 16, 18, 212
sockets (see sockets)
telnet protocol, 20, 150-152
testing (see checking)
text/ content types, 44, 265-266
text/html, 44
text/plain, 44, 52
text/tab-separated-values, 307-309
Thread object, 53
ThreadGroup object, 53
threads, 240
three-dimensional worlds, 8
time and date
daytime protocol, 20, 31, 161, 239, 297-301
document expiration dates, 250
document transmission date, 250
getDateHeader( ), 397
last modification, 250, 261
from MIME header fields, 250, 254
setDateHeader( ), 403
time protocol, 20, 312
in Web server logs, 75
Time Server Protocol, 32
timeouts for reading from socket, 169, 192, 228
Time-To-Live (TTL) value, 328, 334, 340
toExternalForm( ), 92, 286
Toolkit class, xv
_top target string, 132
toString( )
InetAddress class, 66
print statements and, 92
RemoteObject class, 371
ServerSocket class, 194
Socket class, 166
URL class, 92
URLConnection class, 267
Transmission Control Protocol (see TCP)
transmitting (see sending)
transport layer, 14, 16, 352
TTL (Time-To-Live) value, 328, 334, 340
U
UDP (User Datagram Protocol), 16, 18, 212-214
multicast datagrams, 334
simple clients (examples), 233-236
sockets for, 158
UDPClient class (example), 230-233
UDPEchoClient class (example), 240-243
UDPServer class (example), 236-239
unbind( ), 362, 368
unicast sockets, 325
UnicastRemoteObject( ), 373
UnicastRemoteObject class, 355, 371-372
uniform resource locators (see URLs)
UnknownHostException, 59, 61
unmarshaling, 355
unreliable protocols, 16
Unrestricted security level, 54
URIs (uniform resource identifiers), 34, 394
URL( ), 79-83
URL class, 78-94, 280
URLClassLoader class (example), 270-276
URLConnection( ), 255
URLConnection class, 244-248, 255-267, 280-281
allowing input/output, 259
MIME headers and, 248-254, 264-267
RequestProperty methods and, 255
URLConnection object, 89
URLEncoder class, 94-97
URLRequestor program (example), 104-108
URLs (uniform resource locators), 34-36
applets and applet pages, 110
comparing with sameFile( ), 91, 93
converting from virtual to absolute, 392
creating, 79-84
displaying documents by, 131-133
downloading from, 78, 86-91
encoding and, 94-97
extensions, guessing content type from, 264
mapping to remote objects, 361-363
obtaining, 256
obtaining elements of, 84-86, 284-287
protocols in (see protocol handlers)
query strings, 50, 395
redirecting requests for documents, 133, 202-207, 404
relative URLs, 36
URLStreamHandler class, 280, 284-288, 292-296
URLStreamHandlerFactory object, 53, 94, 280-283, 291-296
URNs (uniform resource names), 34
useCaches field, 262
User-Agent header line, 39
User Datagram Protocol (see UDP)
username, remote, 398
users, interacting with, 257-259
V
verifying (see checking)
versions
HTML, 37
Java, xi
video/ content types, 46, 48, 266
virtual paths, converting, 392
VRML (Virtual Reality Modeling Language), 8
W
waitForAll( ), 127
waitforID( ), 127
waiting for media to download, 126
Web pages, 98
downloading, 87, 104-108, 247
saving, 98-103
(see also World Wide Web)
whois protocol, 20, 173-183
graphical client for (example), 177
whois++ protocol, 173
WIDTH constant (ImageObserver), 121
windows, displaying documents in new, 132
working groups, 27
World Wide Web, 25, 98
CGI (see CGI)
HTTP and (see HTTP)
processing server log files, 74-77
search applications for, 8
URLs (see URLs)
(see also Web pages)
writeErrorResponse( ), 404
writing
protocol handlers, 288-291, 296-301
servers, 184, 195-211
servlets, 379-384
URLs, 79-84
URLStreamHandler class, 284-288
X
XBM image format, 112
Copyright 1995-1997 Elliotte Rusty Harold
elharo@sunsite.unc.edu
Last Modified Thursday, August 7, 1997