Cover image for Java 2 platform : unleashed
Title:
Java 2 platform : unleashed
Author:
Jaworski, Jamie.
Personal Author:
Publication Information:
[Indianapolis, IN] : Sams, [1999]

©1999
Physical Description:
xxxiv, 1424 pages : illustrations ; 24 cm + 1 computer optical disc (4 3/4 in.)
General Note:
Includes index.

"This book is for Java programmers ... It is an intermediate-to-advanced book that assumes you know how to use Java programming statements and that you have a basic understanding of exceptions and threads programming"--P. [1].
Language:
English
ISBN:
9780672316319
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Central Library QA76.73.J38 J397 1999 Book and Software Set Central Closed Stacks
Searching...

On Order

Summary

Summary

Java 2 Platform Unleashed is completely revised for Java 2. This complete reference covers all the core APIs of the Java 2 platform as well as higher-level topics that experienced Java programmers need to know. The book includes thousands of lines of code to demonstrate the sophisticated programming techniques that experienced Java programmers demand. Written for experienced Java programmers.


Author Notes

Jamie Jaworski is a professional Java programmer for the U.S. Dept. of Defense. He uses Java to build sophisticated applications including security applications, terrain analysis, and genetic algorithms. Jamie was a consultant to Sun who helped fix many security problems with Java 2. He is also a successful computer book writer and the author of Java 1.1 Developer s Guide.


Table of Contents

Introductionp. 1
Who Should Read This Bookp. 1
Conventions Used in This Bookp. 2
Getting Startedp. 2
Part I Programming with Java 2/JDK 1.2p. 5
1 What's New in JDK 1.2p. 7
The Java Foundations Classesp. 8
Abstract Windowing Toolkit (AWT)p. 8
Swingp. 9
Accessibilityp. 9
Java 2Dp. 10
Drag and Dropp. 10
Other New Capabilitiesp. 10
Java IDLp. 10
The Collections APIp. 11
The Java Extensions Frameworkp. 11
Reference Objectsp. 11
Package Version Identificationp. 11
Input Method APIp. 12
Enhancementsp. 12
Securityp. 12
JavaBeansp. 12
Reflectionp. 13
Audiop. 13
JARp. 13
RMI and Serializationp. 13
JDBCp. 14
Native Interfacep. 14
Performancep. 14
Important Language Changesp. 14
Tools Changesp. 15
Summaryp. 15
2 The JDK 1.2 APIp. 17
API Overviewp. 18
Core APIp. 18
The java.applet Packagep. 18
The JFC Packagesp. 20
The JavaBeans Packagesp. 23
The java.io Packagep. 24
The Language Packagesp. 24
The java.math Packagep. 24
The java.net Packagep. 25
The RMI Packagesp. 25
The Security Packagesp. 26
The java.sql Packagep. 26
The java.text Packagep. 27
The Utility Packagesp. 27
The CORBA Packagesp. 27
Standard Extensionsp. 29
Other APIsp. 29
Java 3Dp. 29
The Java Media Frameworkp. 29
The Speech APIp. 29
The Telephony APIp. 29
JavaMailp. 30
Java Naming and Directory Servicesp. 30
The Java Management APIp. 30
JavaSpacesp. 30
JavaCommercep. 30
Summaryp. 30
3 The Extended Java Security Modelp. 31
Configurable Security Policyp. 32
The Evolution of the Sandboxp. 32
Specifying a Security Policyp. 37
The Contents of the Security Policy Filep. 39
The Syntax of Grant Entriesp. 40
An Example Security Policyp. 42
Policy Permissionsp. 44
The java.awt.AWTPermission Classp. 45
The java.net.NetPermission Classp. 46
The java.util.PropertyPermission Classp. 46
The java.lang.reflect.ReflectPermission Classp. 46
The java.lang.RuntimePermission Classp. 46
The java.security.SecurityPermission Classp. 47
The java.io.SerializablePermission Classp. 48
The java.io.FilePermission Classp. 48
The java.net.SocketPermission Classp. 49
Extending the Sandboxp. 49
Application Securityp. 52
Cryptographic Supportp. 53
Overview of Cryptographyp. 53
The JDK 1.2 Cryptographic Architecturep. 58
Using Certificatesp. 60
Summaryp. 61
4 Overview of JDK 1.2 Programmingp. 63
Applet Programmingp. 64
Application Programmingp. 66
JavaBeans Programmingp. 66
Servlet Programmingp. 66
Developing RMI Objectsp. 67
Developing CORBA Objectsp. 69
Other Possibilitiesp. 70
Moving C/C++ Legacy Code to Javap. 70
Why Move to Java?p. 71
Reasons Against Moving to Javap. 74
Transition Approaches and Issuesp. 75
Translation Approaches and Issuesp. 76
Summaryp. 77
Part II Applet Programmingp. 79
5 JDK 1.2 Applet Writing Basicsp. 81
Applets and the World Wide Webp. 82
The Applet Classp. 82
A Brief HTML Primerp. 84
The Life Cycle of an Appletp. 92
Responding to Eventsp. 92
Using Window Componentsp. 93
Adding Multimedia Featuresp. 93
An Audio Player Appletp. 94
A Word About JavaBeansp. 98
Java Plug-Inp. 98
Summaryp. 99
6 GUI Buildingp. 101
Labelsp. 102
Buttonsp. 103
Handling Eventsp. 104
JDK 1.02 Event Handlingp. 105
JDK 1.1 Event Handlingp. 105
The Buttons Appletp. 108
Components and Containersp. 110
Using Layoutsp. 111
The LayoutManager and LayoutManager2 Interfacesp. 111
The BorderLayout Classp. 111
The CardLayout Classp. 111
The FlowLayout Classp. 112
The GridLayout Classp. 112
The GridBagLayout Classp. 112
The Layouts Appletp. 112
Using a null Layout for Absolute Positioningp. 118
The Positions Appletp. 119
Text Componentsp. 120
TextFieldp. 121
TextAreap. 121
The Text Appletp. 121
Checkboxesp. 123
The CheckboxTest Appletp. 124
Choices and Listsp. 128
The Chooser Appletp. 129
Scrollbarsp. 133
The Scroller Appletp. 134
The ScrollPane Classp. 137
Summaryp. 137
7 Working with the Canvasp. 139
The Canvas and Graphics Classesp. 140
Displaying Bitmapped Imagesp. 140
The DisplayImage Appletp. 141
Drawing and Paintingp. 143
The Draw Appletp. 144
Using Text and Fontsp. 153
Using the Toolkit Classp. 154
The FontTest Appletp. 154
Fonts, Colors, and Text Componentsp. 157
The Edit Appletp. 157
The FontDialog Classp. 162
The ColorDialog Classp. 167
Summaryp. 169
8 Applet Securityp. 171
Using JAR Files and Digital Signaturesp. 172
Using the JAR Toolp. 173
Creating a JAR filep. 174
Listing the Contents of a JAR Filep. 175
Viewing a JAR Filep. 176
Extracting the Contents of a JAR Filep. 177
Signing Appletsp. 179
Specifying an Applet Security Policyp. 184
Working with Certificatesp. 187
Exporting Your Certificatesp. 188
Importing the Certificates of Othersp. 188
Other keytool Commandsp. 189
The java.security Packagesp. 191
Summaryp. 192
Part III Application Programmingp. 193
9 Creating Window Applicationsp. 195
Differences Between Applications and Appletsp. 196
Designing Window Programsp. 197
Window Classesp. 199
Framep. 199
Dialogp. 200
FileDialogp. 200
Opening and Closing Windowsp. 200
Hello Windows!p. 201
Constructing Menusp. 203
The MyMenu Classp. 204
The MyMenuBar Classp. 208
The MenuApp Programp. 210
Popup Menusp. 215
Using Dialog Boxesp. 216
The MessageDialog Classp. 216
The MessageApp Programp. 217
The Accessibility APIp. 221
Summaryp. 222
10 Writing Console Applicationsp. 223
Differences Between Console and Window Applicationsp. 224
Keyboard Input and Console Outputp. 225
BlackJackAppp. 226
Overview of BlackJackAppp. 233
The java.lang Packagesp. 239
The Object, Class, and Package Classesp. 239
The ClassLoader, SecurityManager, and Runtime Classesp. 243
The System Classp. 247
Wrapped Classesp. 249
The Math Class and Comparable Interfacep. 252
The String and StringBuffer Classesp. 253
Threads and Processesp. 258
The Compiler Classp. 260
Exceptions and Errorsp. 260
The Void Classp. 261
Reflection and the java.lang.reflect Packagep. 261
Reference Objects and the java.lang.ref Packagep. 266
Summaryp. 268
11 Using the Utility and Math Packagesp. 269
The java.util Packagep. 270
The Collections APIp. 270
Date and Calendar-Related Classesp. 288
Internationalization Classesp. 292
Other java.util Classes and Interfacesp. 293
The java.util.zip Packagep. 297
Checksump. 297
Adler32p. 297
CRC32p. 297
CheckedInputStreamp. 297
CheckedOutputStreamp. 298
Deflaterp. 298
Inflaterp. 299
DeflaterOutputStreamp. 299
InflaterInputStreamp. 299
GZIPOutputStreamp. 299
GZIPInputStreamp. 300
ZipFilep. 300
ZipEntryp. 300
ZipOutputStreamp. 301
ZipInputStreamp. 301
The UnzipApp Programp. 302
The java.util.jar Packagep. 303
The JarFile Classp. 303
The JarEntry Classp. 303
The Manifest Classp. 304
The Attributes Classp. 304
The Attributes.Name Classp. 304
The JarInputStream Classp. 304
The JarOutputStream Classp. 304
The JarApp Programp. 304
The java.util.mime Packagep. 307
The java.math Packagep. 307
BigDecimalp. 307
BigIntegerp. 308
The BigNumApp Programp. 308
Summaryp. 309
Part IV Swing Programmingp. 311
12 Introducing Swingp. 313
What Is Swing?p. 314
Swing, AWT, and the JFCp. 314
The Swing Component Hierarchyp. 316
Swing Package Overviewp. 318
Developing a Swing-Based GUIp. 318
How SwingStart Worksp. 324
Summaryp. 326
13 Working with Swing Componentsp. 327
Swing GUI Buildingp. 328
Windowsp. 328
Menusp. 328
Panelsp. 334
Layoutsp. 334
Iconsp. 334
Bordersp. 335
Tool Tipsp. 341
Toolbarsp. 341
Labels and Buttonsp. 344
Text Componentsp. 344
Lists and Combo Boxesp. 344
Sliders and Progress Barsp. 345
Scrollbarsp. 345
Tablesp. 345
Treesp. 351
Swing Event Handlingp. 357
Swing Appletsp. 358
CalendarAppletp. 358
Converting to Swingp. 364
Summaryp. 364
14 Changing the Look and Feel of Your Swing Componentsp. 365
Look and Feel Explainedp. 366
The Model-View-Controller Architecturep. 367
Combining the View and the Controllerp. 369
Changing Look and Feelp. 369
The SwingLF Applicationp. 371
Changing the Modelp. 376
Look and Feel Programmingp. 376
The RedButtonUI Classp. 378
Testing the Look and Feelp. 379
Summaryp. 383
Part V Enhancing Your Applets and Applicationsp. 385
15 Using the Clipboardp. 387
Clipboard Basicsp. 388
The Clipboard Classp. 388
The Transferable Interfacep. 389
The DataFlavor Classp. 389
The FlavorMap Interface and SystemFlavorMap Classp. 390
The ReadClipApp Programp. 390
Clipboard Ownershipp. 394
The StringSelection Classp. 394
Copying and Pasting Textp. 394
Summaryp. 399
16 Working with Drag and Dropp. 401
The Drag and Drop APIp. 402
Using Drag and Drop in Your Programsp. 405
Summaryp. 410
17 Input/Output Streamsp. 411
Streamsp. 412
The java.io Class Hierarchyp. 412
The java.io Interfacesp. 416
The InputStream Classp. 416
The read() Methodp. 417
The available() Methodp. 417
The close() Methodp. 417
Markable Streamsp. 417
The skip() Methodp. 418
The OutputStream Classp. 418
The write() Methodp. 418
The flush() Methodp. 418
The close() Methodp. 418
Byte Array I/Op. 419
The ByteArrayInputStream Classp. 419
The ByteArrayOutputStream Classp. 419
The ByteArrayIOApp Programp. 420
The StringBufferInputStream Classp. 421
File I/Op. 421
The File Classp. 421
The FileDescriptor Classp. 422
The FileInputStream Classp. 422
The FileOutputStream Classp. 422
The FileIOApp Programp. 422
The SequenceInputStream Classp. 424
The SequenceIOApp Programp. 424
Filtered I/Op. 426
The FilterInputStream Classp. 426
The FilterOutputStream Classp. 427
Buffered I/Op. 427
PushbackInputStreamp. 430
The LineNumberInputStream Classp. 432
Data I/Op. 432
The PrintStream Classp. 434
Pipe I/Op. 435
The PipedIOApp Programp. 436
Object I/Op. 439
The ObjectIOApp Programp. 439
The Reader and Writer Classesp. 442
The Reader Classp. 442
The Writer Classp. 442
Character Array and String I/Op. 442
The CharArrayIOApp and StringIOApp Programsp. 443
The InputStreamReader and OutputStreamWriter Classesp. 445
The InputStreamReader Classp. 445
The OutputStreamWriter Classp. 446
The FileReader and FileWriter Classesp. 446
The CharFileIOApp Programp. 446
Buffered Character I/Op. 447
The LineNumberReader Classp. 448
Filtered Character I/Op. 449
The PushbackReader Classp. 449
The PipedReader and PipedWriter Classesp. 449
The PrintWriter Classp. 450
The RandomAccessFile Classp. 450
The RandomIOApp Programp. 450
The StreamTokenizer Classp. 451
The StreamTokenApp Programp. 452
Summaryp. 454
18 Printingp. 455
JDK 1.1 Printing Classes and Methodsp. 456
Working with Print Jobsp. 457
Page Layout Controlsp. 460
Printing Text and Graphicsp. 463
The java.awt.print Packagep. 465
The PrintBookApp Programp. 466
Summaryp. 471
19 Internationalizationp. 473
What Is Internationalization?p. 474
Using Unicodep. 475
Managing Locales and Resourcesp. 476
The ResourceBundle Classesp. 477
Performing Locale-Specific Format Conversionsp. 481
The DateFormat Classp. 481
The NumberFormat Classp. 483
The MessageFormat Classp. 486
The FieldPosition and ParsePosition Classesp. 486
Collationp. 487
The Iterator Classes and Interfaces of java.textp. 490
Summaryp. 491
Part VI Multimedia Programmingp. 493
20 Working with 2D and 3D Graphicsp. 495
The Java 2D APIp. 496
Moving from Graphics to Graphics2Dp. 497
Drawing Graphicsp. 498
Using Text and Fontsp. 508
Displaying Imagesp. 511
Using Transformsp. 514
The Java 3D APIp. 518
The javax.media.j3d Packagep. 518
The javax.vecmath Packagep. 519
Using 3D Graphics in Your Programsp. 520
Summaryp. 523
21 Using Audio and Videop. 525
Audio and Video Basicsp. 526
The Java Media Frameworkp. 528
The JMF Playerp. 528
The JMF APIp. 529
The javax.media.protocol Packagep. 532
Adding Audio and Video Clips to Your Programsp. 534
The MediaApplication Programp. 534
The MediaApplet Appletp. 540
The Real-Time Transport Protocol (RTP) Session Manager APIp. 543
Summaryp. 544
22 Creating Animationsp. 545
Animation Basicsp. 546
A Simple Animationp. 547
A Graphics Animationp. 549
Improving Animation Display Qualitiesp. 553
An Updated Graphics Animationp. 554
The Animation APIp. 557
Summaryp. 557
23 Integrating Speech and Telephony Capabilitiesp. 559
The Java Speech APIp. 560
Speech Recognitionp. 562
Speech Synthesisp. 563
The Java Telephony APIp. 566
Summaryp. 568
Part VII Creating JavaBeansp. 569
24 The Software Component Assembly Modelp. 571
Components and Containersp. 572
Introspection and Discoveryp. 574
Interface Methods and Propertiesp. 575
Persistencep. 576
Eventsp. 577
Visual Designp. 578
Summaryp. 579
25 The JavaBeans Development Kitp. 581
Downloading and Installing the BDKp. 582
Inside the BDKp. 582
Using the BeanBoxp. 583
Understanding the Example Beansp. 588
Other Bean Development Toolsp. 589
Summaryp. 590
26 Developing Beansp. 591
How Do Beans Work?p. 592
Graphic Representation and Visual Layoutp. 592
Customizable and Persistent Propertiesp. 592
Introspectionp. 596
Connecting Events to Interface Methodsp. 597
Inside java.beansp. 597
Design Supportp. 597
Introspection Supportp. 598
Change Event-Handling Supportp. 600
Aggregationp. 600
The java.beans.beancontext Packagep. 600
Developing Beansp. 601
A Gauge Beanp. 601
A Text Canvas Beanp. 609
A Quiz Appletp. 614
Using Serializationp. 619
Summaryp. 624
27 Notable Beansp. 625
The HotJava HTML Componentp. 626
Installing the HotJava HTML Componentp. 626
Running the HotJava HTML Component in the BeanBoxp. 627
The RunningText Bean by Jayakrishnan Nairp. 629
Installing the RunningText Beanp. 629
Running the RunningText Bean in the BeanBoxp. 630
Beans by IBMp. 631
Installing the Gauge Beansp. 631
Running the Gauge Beans in the BeanBoxp. 632
Summaryp. 635
28 Using InfoBusp. 637
How InfoBus Worksp. 638
The InfoBus APIp. 639
A Bean Communication Examplep. 640
The TimeGenerator Beanp. 641
The TimeZoneList Beanp. 642
The TimeDisplay Beanp. 644
The TimeApplet Classp. 647
Summaryp. 648
29 Glasgow Developmentsp. 649
The Extensible Runtime Containment and Services Protocolp. 650
BeanContext Event Handlingp. 652
A BeanContext Examplep. 653
The JavaBeans Activation Frameworkp. 657
The JAFApp Programp. 659
Summaryp. 664
Part VIII Network Programmingp. 665
30 Network Programming with the java.net Packagep. 667
The Internet Protocol Suitep. 668
What Is the Internet and How Does It Work?p. 668
Connection-Oriented Versus Connectionless Communicationp. 670
Multicast Addressingp. 671
Client/Server Computing and the Internetp. 671
Sockets and Client/Server Communicationp. 671
Inside java.netp. 672
The InetAddress Classp. 673
The Socket Classp. 674
The ServerSocket Classp. 680
The DatagramSocket Classp. 684
The DatagramPacket Classp. 685
The MulticastSocket Classp. 690
The SocketImpl and DataSocketImpl Classes and the SocketImplFactory Interfacep. 690
Web-Related Classesp. 691
The URL Classp. 692
URLConnection and HttpURLConnectionp. 694
URLEncoderp. 694
ContentHandler, ContentHandlerFactory, and FileNameMapp. 697
The URLStreamHandler Class and the URLStreamHandlerFactory Interfacep. 698
Summaryp. 698
31 Client Programsp. 699
Types of Clientsp. 700
Client Responsibilitiesp. 701
A Simple Telnet Clientp. 701
The Network Virtual Terminalp. 701
The Interpret as Command Codep. 702
Negotiated Optionsp. 702
Symmetry Between Terminals and Processesp. 702
The TelnetApp Programp. 703
The NVTPrinter Classp. 706
The NVTInputStream Classp. 707
The NVTOutputStream Classp. 709
The Web Fetcher Programp. 710
Summaryp. 712
32 Server Programsp. 713
Types of Serversp. 714
Server Responsibilitiesp. 714
A Multithreaded Server Frameworkp. 715
Writing Your Own Web Serverp. 718
The HTTP09Server Programp. 718
How HTTP09Server Worksp. 729
Configuring HTTP09Serverp. 730
Summaryp. 731
33 Content and Protocol Handlersp. 733
Using Content Handlersp. 734
Multipurpose Internet Mail Extensions (MIME)p. 734
Developing Content Handlersp. 735
A Content Handler Examplep. 735
The GridContentHandler Classp. 736
The GetGridApp Programp. 737
Using Protocol Handlersp. 740
Developing Protocol Handlersp. 740
A Protocol Handler Examplep. 741
The GetFortuneApp Programp. 742
Summaryp. 744
34 Using JavaMailp. 745
How Email Systems Workp. 746
The JavaMail APIp. 747
The javax.mail Packagep. 749
The javax.mail.event Packagep. 751
The javax.mail.internet Packagep. 752
The javax.mail.search Packagep. 752
A Mail Clientp. 753
Summaryp. 758
35 Naming and Directory Servicesp. 759
What Are Naming and Directory Services?p. 760
Lightweight Directory Access Protocolp. 761
The JNDI APIp. 763
The javax.naming Packagep. 763
The javax.naming.directory Packagep. 764
The javax.naming.spi Packagep. 764
Incorporating Service Providers in Your Applicationsp. 765
Using the Flat Service Providerp. 767
Summaryp. 772
36 Working with the Java Management APIp. 773
Overview of System, Network, and Service Managementp. 774
The JMAPI Solutionp. 775
The Components of JMAPIp. 778
Summaryp. 779
Part IX Developing Distrbuted Applicationsp. 781
37 Distributed Application Architecturep. 783
Distributed Application Design Approachesp. 784
Distributed Applications on the Internetp. 785
Applets on an Intranetp. 785
The Distributed Computing Environmentp. 786
The Distributed Component Object Modelp. 787
The Common Object Request Broker Architecture (CORBA)p. 790
Java Remote Method Invocationp. 792
The Java Distributed Object Modelp. 793
The Three-Tiered Layering of the Java RMIp. 793
Passing Arguments and Returning Valuesp. 796
Objects and Remote Method Invocationp. 796
Distributed Application Securityp. 797
Transport Securityp. 797
Authentication and Access Controlp. 798
Summaryp. 799
38 Building Distributed Applications with the java.rmi Packagesp. 801
RMI and Distributed Applicationsp. 802
RMI Terminologyp. 803
The java.rmi Packagesp. 804
The java.rmi Packagep. 805
The java.rmi.registry Packagep. 806
The java.rmi.server Packagep. 807
The java.rmi.activation Packagep. 809
The java.rmi.dgc Packagep. 811
Implementing RMIp. 811
Implementing the RMI Server on the Remote Hostp. 811
Implementing the RMI Client on the Local Hostp. 815
Summaryp. 816
39 Working with Remote Objectsp. 817
Using Remote Objectsp. 818
The InfoClient Appletp. 818
The InfoServer Interfacep. 822
The InfoServerImpl Classp. 822
Compiling and Installing the InfoServer Applicationp. 823
Running the InfoServer Applicationp. 824
Working with Class Loaders and Security Managersp. 825
A Random Number Serverp. 825
The RandomServer Interfacep. 826
The RandomServerImpl Classp. 826
The RandomClient Classp. 827
The Bootstrap Classp. 829
The BootstrapSecurityManager Classp. 831
Compiling and Installing the RandomServer Applicationp. 832
Running the RandomServer Applicationp. 833
Locating Remote Objectsp. 834
Automatic Object Activationp. 836
How Remote Activation Worksp. 836
Creating an Activatable Objectp. 838
A Remote Activation Examplep. 839
Compiling, Installing, and Running Activation Serverp. 843
Summaryp. 844
40 Using Object Serialization and JavaSpacesp. 845
Storing Objects to Streamsp. 846
The Serializable Interfacep. 846
The serialver Toolp. 849
The Externalizable Interfacep. 850
Object Serialization and RMIp. 853
Security Considerationsp. 854
JavaSpacesp. 854
Summaryp. 855
41 Java IDL and ORBsp. 857
The Object Management Group and CORBAp. 858
ORBsp. 860
Interoperability Between ORBsp. 860
The Interface Definition Languagep. 861
Using Java IDLp. 862
Developing Clients and Serversp. 868
Compiling and Running the Client and Serverp. 872
Summaryp. 873
42 Network Computersp. 875
What Are NCs?p. 876
Advantages of NCsp. 877
Disadvantages of NCsp. 878
The NC Standardp. 879
NC Productsp. 880
IBM Network Station Series 100, 300, and 1000p. 880
Network Computing Devices Explorap. 880
HDS @workstationp. 880
NCI NC Softwarep. 880
JavaStationp. 881
Using Network Servers with JavaStationp. 881
NC/Network Server Interactionp. 882
Netra j Serverp. 882
Developing Java Software Applications for JavaStationp. 883
JavaStation and the Intranetp. 884
Summaryp. 885
Part X Database Programmingp. 887
43 Database Fundamentalsp. 889
What Is a Database?p. 890
Relational Databasesp. 891
Organizing Tablesp. 892
Working with Keysp. 892
Normalizing Tablesp. 893
Structured Query Languagep. 894
Using SQL as a Data Definition Languagep. 895
Using SQL as a Data Maintenance Languagep. 897
Using SQL as a Data Query Languagep. 899
Remote Database Accessp. 900
ODBC and JDBC Driversp. 901
Summaryp. 904
44 Connecting to Databases with the java.sql Packagep. 905
Setting Up a Database Connectionp. 906
The DriverManager Classp. 907
The Driver Interfacep. 909
The DriverPropertyInfo Classp. 909
The DriverApp Programp. 910
Connecting to the Databasep. 912
The Connection Interfacep. 912
The DatabaseMetaData Interfacep. 913
The ConnectApp Programp. 914
Working with Result Setsp. 916
The ResultSetMetaData Interfacep. 916
The ResultApp Programp. 917
Executing SQL Statementsp. 919
The Statement Interfacep. 919
The PreparedStatement Interfacep. 920
The CallableStatement Interfacep. 921
The StatementApp Programp. 921
The Date, Time, and Timestamp Classesp. 925
Summaryp. 925
45 Using JDBCp. 927
Using Alternate JDBC Drivers and Databasesp. 928
Setting Up ODBC Drivers to Work with Microsoft Access Databasesp. 928
Setting Up the IDS Server and IDS JDBC Driverp. 929
Setting Up the mSQL Serverp. 930
Setting Up the mSQL JDBC Driverp. 930
Setting Up the ActMSQL Databasep. 930
Using the AccessApp Programp. 931
How AccessApp Worksp. 936
Interacting with the Databasep. 936
Working with Result Setsp. 940
Transaction Processingp. 941
Transaction Isolationp. 942
The CommitApp Programp. 943
How CommitApp Worksp. 948
Database Securityp. 949
Summaryp. 950
46 Integrating Database Support into Web Applicationsp. 951
Using java.sql with Appletsp. 952
Trusted vs. Untrusted Appletsp. 954
Form Handling and Database Accessp. 954
How the Survey Applet Worksp. 960
Performing Database Searchesp. 960
How the SQL Applet Worksp. 964
Accessing Multimedia Databasesp. 965
How the Multimedia Applet Worksp. 970
JavaBlend and the Future of Java Database Programmingp. 971
Summaryp. 972
Part XI Server-Side Javap. 973
47 Sun's Java Web Serverp. 975
What Are the JavaServer Toolkit and Java Web Server?p. 976
How Does Java Web Server Work?p. 977
Installing Java Web Serverp. 978
Running Java Web Serverp. 978
Using Servletsp. 980
Writing Servletsp. 983
The Servlet APIp. 984
The TimeServlet Classp. 986
The EchoRequest Servletp. 991
Summaryp. 996
48 Programming Other Serversp. 997
Java and the Common Gateway Interfacep. 998
Web Server to CGI Program Communicationp. 998
CGI Program to Web Server Communicationp. 999
Server-Side Java Programming with Netscape Serversp. 1001
Server-Side Java Programming with Microsoft Serversp. 1002
The Java Servlet Development Kitp. 1004
Installing the JSDK with the Apache Web Serverp. 1004
Installing the JSDK with Netscape Serversp. 1005
Installing the JSDK with Microsoft Serversp. 1005
Using the Servlet APIp. 1006
Using servletrunnerp. 1006
Summaryp. 1010
49 Pushing Javap. 1011
Castanetp. 1012
How Castanet Worksp. 1013
What's So Good About Castanet?p. 1014
The Castanet Tunerp. 1016
Subscribing to a Channelp. 1018
The Castanet Transmitterp. 1019
Castanet Publisherp. 1020
Running the Crossword Applicationp. 1024
Creating an Applet and Publishing It with Castanetp. 1025
Updating the Information Displayed by the Appletp. 1028
How the Gallery Applet Worksp. 1029
Other Castanet Publishing Capabilitiesp. 1030
Netcasterp. 1031
Netcaster Versus Castanetp. 1031
Developing Channelsp. 1031
Active Channelsp. 1032
The Channel Definition Formatp. 1032
Creating Active Channelsp. 1033
Summaryp. 1035
50 Java Commerce and JavaCardp. 1037
Java Electronic Commerce Frameworkp. 1038
The Java Commerce APIp. 1040
The Java Commerce Toolkitp. 1041
Java Walletp. 1041
The Java Card APIp. 1042
Summaryp. 1042
Part XII Extending Javap. 1043
51 Java Platforms and Extensionsp. 1045
Operating System Platforms Supporting Javap. 1046
The Java Platformp. 1046
Core APIp. 1047
Standard Extensionsp. 1048
Personal Javap. 1048
Embedded Javap. 1049
Java Cardp. 1049
Java Runtime Environmentp. 1049
Java Performance Enhancementsp. 1049
Navigator Classesp. 1050
Internet Explorer Classesp. 1050
Other Class Librariesp. 1050
Native Methodsp. 1051
Summaryp. 1051
52 JavaOSp. 1053
Why JavaOS?p. 1054
JavaOS Featuresp. 1054
The JavaOS Architecturep. 1055
The JavaOS Kernelp. 1056
System Bootingp. 1056
Memory Managementp. 1056
Interrupt and Exception Handlingp. 1057
Timer Managementp. 1057
Direct Memory Access Controlp. 1057
Multithreading Supportp. 1057
File System Accessp. 1058
Native Code Interfacep. 1058
Debugging Supportp. 1058
The JVMp. 1058
JavaOS Runtime Componentsp. 1058
Device Driversp. 1059
TCP/IP Networkingp. 1059
Graphics Systemp. 1060
Windowing Systemp. 1060
Other API Classesp. 1060
HotJava and HotJava Viewsp. 1060
Summaryp. 1061
53 Native Methodsp. 1063
The Java Native Interfacep. 1064
Accessing Native Methodsp. 1064
Creating a Class for Native Methodsp. 1066
Using javahp. 1067
Implementing Native Methodsp. 1069
Creating a Shared Libraryp. 1070
Putting It All Togetherp. 1070
Converting Between Java Types and C Typesp. 1071
Summaryp. 1071
54 Dirty Javap. 1073
Microsoft and Javap. 1074
The Microsoft JVMp. 1075
Visual J++p. 1076
Microsoft APIsp. 1078
Using Java and COM Objectsp. 1078
Accessing COM Objects from Java Objectsp. 1079
Accessing Java Objects from COMp. 1079
Using Java with DCOMp. 1080
The JavaBeans Bridge for ActiveXp. 1080
Migrating from ActiveX to JavaBeansp. 1081
Working with the Java Plug-Inp. 1081
Summaryp. 1082
55 Java Command Languagep. 1083
What's Jacl?p. 1084
A Tcl Primerp. 1086
Command Syntaxp. 1086
Including Spaces as Part of a Fieldp. 1086
Command Substitutionp. 1086
Variable Substitutionp. 1087
Arraysp. 1087
Escape Charactersp. 1087
Commentsp. 1087
Expressionsp. 1087
Listsp. 1087
Variable Declarationp. 1088
Built-In Commandsp. 1088
Built-In Variablesp. 1089
Accessing Java from Tcl Scriptsp. 1089
Jacl Versus Tclp. 1092
Tcl Blendp. 1092
Summaryp. 1093
56 Java Development Toolsp. 1095
Visual Development Toolsp. 1096
Java Workshopp. 1096
Java Studiop. 1097
JavaPlanp. 1097
Visual Cafe for Javap. 1097
Visual Age for Javap. 1098
Visual J++p. 1098
JBuilder Client/Server Suitep. 1099
Super Mojop. 1099
JDesignerProp. 1099
SuperCede Java Editionp. 1100
Jambap. 1100
Summaryp. 1100
A Java Language Summaryp. 1101
Java Packagesp. 1102
The import Statementp. 1102
Commentsp. 1102
Identifiersp. 1103
Reserved Wordsp. 1103
Primitive Data Types and Literal Valuesp. 1104
Classes and Objectsp. 1105
Class Declarationsp. 1106
Variable Declarationsp. 1107
Constructor Declarationsp. 1108
Method Declarationsp. 1109
Static and Object Initializersp. 1109
Interfacesp. 1110
Blocksp. 1110
Local Variable Declarationsp. 1110
Statementsp. 1111
Empty Statementp. 1111
Block Statementp. 1111
Method Invocationp. 1111
Allocation Statementsp. 1111
Assignment Statementsp. 1112
The if Statementp. 1112
Statement Labelsp. 1112
The switch Statementp. 1112
The break Statementp. 1113
The for Statementp. 1113
The while Statementp. 1113
The do Statementp. 1114
The continue Statementp. 1114
The synchronized Statementp. 1114
The try Statementp. 1114
The return Statementp. 1115
Operatorsp. 1115
Multithreadingp. 1116
JDK 1.2 Changes to Multithreadingp. 1117
B Java Environment Variablesp. 1119
Adding the JDK Tools to Your PATHp. 1120
Setting Your CLASSPATHp. 1120
Using JDK HOME and JRE HOMEp. 1121
C The JDK 1.2 Toolsetp. 1123
Development Toolsp. 1124
javacp. 1124
javap. 1124
jdbp. 1125
javapp. 1126
javadocp. 1126
appletviewerp. 1127
javahp. 1128
Conversion Toolsp. 1128
Archive Toolsp. 1129
Security Toolsp. 1130
policytoolp. 1130
keytoolp. 1131
jarsignerp. 1131
Remote Method Invocation Toolsp. 1132
rmicp. 1132
rmiregistryp. 1133
rmidp. 1133
serialverp. 1133
Java IDL Toolsp. 1134
Servlet Toolsp. 1134
D Generating Documentation and Help Filesp. 1135
How javadoc Worksp. 1136
Using javadocp. 1137
Placing Doc Commentsp. 1141
Using javadoc Tagsp. 1144
Embedding Standard HTMLp. 1147
Docletsp. 1148
JavaHelpp. 1151
E The Java Extensions Frameworkp. 1153
Installed Extensionsp. 1154
Downloaded Extensionsp. 1154
F JDK 1.2 API Descriptionp. 1157
Package java.appletp. 1159
Package java.awtp. 1159
Package java.awt.colorp. 1168
Package java.awt.datatransferp. 1170
Package java.awt.dndp. 1171
Package java.awt.eventp. 1174
Package java.awt.fontp. 1177
Package java.awt.geomp. 1180
Package java.awt.imp. 1183
Package java.awt.imagep. 1184
Package java.awt.image.renderablep. 1189
Package java.awt.printp. 1190
Package java.beansp. 1192
Package java.beans.beancontextp. 1194
Package java.iop. 1197
Package java.langp. 1205
Package java.lang.refp. 1213
Package java.lang.reflectp. 1214
Package java.mathp. 1215
Package java.netp. 1216
Package java.rmip. 1220
Package java.rmi.activationp. 1222
Package java.rmi.dgcp. 1224
Package java.rmi.registryp. 1225
Package java.rmi.serverp. 1226
Package java.securityp. 1228
Package java.security.aclp. 1235
Package java.security.certp. 1236
Package java.security.interfacesp. 1237
Package java.security.specp. 1239
Package java.sqlp. 1240
Package java.textp. 1243
Package java.utilp. 1245
Package java.util.jarp. 1251
Package java.util.zipp. 1252
Package javax.accessibilityp. 1254
Package javax.swingp. 1256
Package javax.swing.borderp. 1269
Package javax.swing.colorchooserp. 1270
Package javax.swing.eventp. 1271
Package javax.swing.filechooserp. 1276
Package javax.swing.plafp. 1277
Package javax.swing.plaf.basicp. 1281
Package javax.swing.plaf.metalp. 1289
Package javax.swing.plaf.multip. 1293
Package javax.swing.tablep. 1296
Package javax.swing.textp. 1297
Package javax.swing.text.htmlp. 1306
Package javax.swing.treep. 1309
Package javax.swing.undop. 1311
Package org.omg.CORBAp. 1312
Package org.omg.CORBA.DynAnyPackagep. 1323
Package org.omg.CORBA.ORBPackagep. 1324
Package org.omg.CORBA.TypeCodePackagep. 1324
Package org.omg.CORBA.portablep. 1325
Package org.omg.CosNamingp. 1326
Package org.omg.CosNaming.NamingContextPackagep. 1329
Indexp. 1333

Google Preview