Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Wednesday, April 4, 2012

Eclipse Web Tools Platform, Developing Java (TM) Web Applications






Naci Dai
Lawrence Mandel
Arthur Ryman

Contents
Foreword xvii
Preface xix
Acknowledgments xxiii
About the Authors xxv
Part I ❍ Getting Started 1
Chapter 1 Introduction 3
Java Web Application Development and Eclipse 3
What This Book Contains 4
How This Book Is Organized 5
Source Code Examples 8
Introducing League Planet 9
Summary 10
Chapter 2 About the Eclipse Web Tools Platform Project 13
WTP Is Born 13
WTP Economics 15
Reducing Development Expense 16
Generating Revenue 19
The Structure of WTP 22
The Scope of WTP 23
WTP Subprojects 24
The Architecture of WTP 27
The WST Subproject 29
The JST Subproject 34
Contributing to WTP 37
Become a User 37
Monitor the Newsgroup 37
Report a Problem 38
Suggest an Improvement 38
Fix a Bug 39
Write an Article or Tutorial 39
Become a Committer 40
Grow the Community 40
Summary 40
Chapter 3 Quick Tour 41
Overview 41
Iteration 1: J2EE Web Applications 44
Add a Server Runtime Environment 46
Create a Dynamic Web Project 51
Create and Edit a JSP 56
Run the JSP on the Server 57
Summary of Iteration 1 60
Iteration 2: Servlets and Scriptlets 60
Add a Java Scriptlet to a JSP 60
Debug a JSP 61
Create a Servlet 64
Debug a Servlet 69
Summary of Iteration 2 70
Iteration 3: Database Access 71
Connect to a Database 72
Execute SQL Statements 75
Add Database Access to a Web Application 78
Summary of Iteration 3 82
Iteration 4: Web Services 82
Deploy a Web service 83
Use a Test Client 86
Monitor SOAP Messages 87
Summary of Iteration 4 88
Summary 88
Chapter 4 Setting Up Your Workspace 91
Installing and Updating WTP 91
The Installable Components of WTP 91
WTP Build Types 92
Installation via Update Manager 95
Installation via Zip Files 98
Installing Third-Party Content 100
JDK Setup 103
Verifying the Installation 103
Updating WTP 104
Configuring WTP 105
Data Preferences 107
Internet Preferences 107
Server Preferences 107
Validation Preferences 107
Web and XML Preferences 108
Web Services Preferences 108
XDoclet Preferences 109
Sharing Settings 110
Summary 110
Part II ❍ Java Web Application Development 111
Chapter 5 Web Application Architecture and Design 113
The Web Landscape 113
Web Applications 115
Java Web Applications 116
Layered Web Application Design 120
Model View Controller (MVC) for the Web 123
Java Application Frameworks 128
Service-Oriented Architecture (SOA) 130
Providing Services: The Service Layer 130
Case Study: League Planet 133
Summary 135
Chapter 6 Organizing Your Development Project 137
Web Project Types and J2EE Applications 138
Web Projects 139
J2EE Modules 140
Creating Applications 140
Creating EJB Applications 148
Creating Enterprise Applications 154
Advanced Web Projects 160
Modeling the Developer View 162
Example Projects 165
Basic Enterprise Application 165
Dividing a Web Module into Multiple Projects 171
Using Maven for Web Application Development 180
Summary 196
Chapter 7 The Presentation Tier 199
Introduction 199
Interaction Design 200
Graphic Design 203
The Structure of the Presentation Tier 204
Iteration 1: Static Web Projects, HTML, and the
Structured Source Editors 208
Static Web Projects 208
HTML 211
Structured Source Editors 218
Templates 221
Snippets 224
Summary of Iteration 1 230
Iteration 2: CSS 230
Summary of Iteration 2 234
Iteration 3: JavaScript 234
E-Mail Address Obfuscation 234
Data Entry Form Validation 236
Summary of Iteration 3 247
Iteration 4: XML and XSLT 248
XML 248
XSLT 252
Summary of Iteration 4 257
Iteration 5: DTD 257
Summary of Iteration 5 261
Iteration 6: Servers, Dynamic Web Projects,
and Servlets 261
Servers 261
Dynamic Web Projects 267
Servlets 270
Summary of Iteration 6 279
Iteration 7: JSP 279
Summary of Iteration 7 289
Iteration 8: Monitoring HTTP Sessions 289
HTTP Sessions 289
The TCP/IP Monitor 290
Viewing HTTP Sessions with the TCP/IP Monitor 291
Modifying and Resending a Message 293
Summary of Iteration 8 295
Summary 295
Chapter 8 The Business Logic Tier 297
A Common Business Tier Design 300
Iteration 1: The Domain Model 301
J2EE Utility Projects 301
The Object Model 304
The Service Layer 310
The Data Access Layer 315
Testing 320
Summary of Iteration 1 324
Iteration 2: Developing Session EJBs 325
Adding JBoss 329
XDoclet 332
EJB Projects 335
Creating Session Beans 339
Building a Web Client 349
Running the Application 352
Developing EJB 3.0 with WTP 356
Summary of Iteration 2 358
Iteration 3: Message-Driven Beans 358
A Brief Introduction to MDBs 358
Create an MDB 359
Add a Queue to JBoss 363
Create a JMS Web Client 363
Summary of Iteration 3 367
Summary 367
Chapter 9 The Persistence Tier 369
Designs for the Persistence Layer 370
Use JDBC APIs to Map Objects to a Database 371
Use Entity Beans to Map Objects to a Database 372
Use Object-Relational Frameworks to Map
Objects to a Database 373
Overview of Iterations 374
Iteration 1: Creating a Database 375
Summary of Iteration 1 385
Iteration 2: Data Layer 386
Summary of Iteration 2 391
Iteration 3: Entity Beans 392
Preparing JBoss, Derby, and XDoclet 393
Adding a CMP 396
Adding ejbCreate and finder Methods 401
Adding the Ice Hockey CMP Data Access Object 408
Testing the CMP Implementation 410
Developing JPA with WTP 414
Summary of Iteration 3 418
Summary 418
Chapter 10 Web Services 421
WSDL 422
SOAP 423
REST 424
REST Style Web Services 426
Overview of Iterations 427
Iteration 1: Developing Web Services Top-Down 428
XSD 429
WSDL 435
Deploying Web Services 440
Implementing the Web Service 446
Testing with the Web Services Explorer 451
Summary of Iteration 1 454
Iteration 2: Developing Web Services Bottom-Up 454
Develop the Java Service Implementation 455
Deploy the Service 460
Summary of Iteration 2 462
Iteration 3: Generating Web Service Client Proxies 464
Generate a Java Client Proxy and JSP Test Client 464
Using the JSP Test Client 468
Summary of Iteration 3 470
Iteration 4: Testing Web Services for Interoperability 470
Checking Messages for WS-I Compliance 471
Summary of Iteration 4 476
Iteration 5: Using Web Services in Web Applications 477
Generate the Query Web Service Client 477
Create the Servlets 478
Impot the User Interface Code 480
Test the User Interface 491
Summary of Iteration 5 494
Iteration 6: Discovering and Publishing Web Services 494
UDDI 495
WSIL 501
Summary of Iteration 6 508
Summary 508
Chapter 11 Testing 509
Automated Testing 511
Overview of Iterations 512
Iteration 1: Unit Testing with JUnit 512
Creating a Test Project 513
JUnit Test Case 515
JUnit Test Suite 518
Summary of Iteration 1 520
Iteration 2: Integration Testing with Cactus 520
Summary of Iteration 2 527
Iteration 3: System Testing with HttpUnit 528
Summary of Iteration 3 533
Iteration 4: Performance Testing with TPTP 533
Creating a Performance Test Project 536
HTTP Recording Test 536
Generating a Report 538
Summary of Iteration 4 539
Iteration 5: Profiling with TPTP 540
Summary of Iteration 5 545
Summary 546
Part III ❍ Extending WTP 549
Chapter 12 Adding New Servers 551
Overview of Adding a Generic Server Adapter 554
The GlassFish Server Runtime 554
Server Adapter Plug-ins 556
Adding Support for a New Server Runtime 558
Adding a New Server Type for a Runtime 561
Adding a New Runtime Target Handler 562
Facets and Runtime Components 563
Extending the Server Tools UI 565
The Generic Server Definition 566
Publishers 570
Testing the Server Adapter 573
Summary 580
Chapter 13 Supporting New File Types 583
Creating the DocBook Extension Plug-in 585
The DocBook Validator 585
The WTP Validation Framework 586
Implementing the DocBook Validator 587
Creating a Custom Marker Type 598
Declaring the DocBook Content Type 601
Summary 605
Chapter 14 Creating WSDL Extensions 607
Creating the WSDL Extension Plug-in 612
Extending the WSDL Editor 612
Customizing the Look of Extensibility
Elements in the Editor’s Design View 614
Adding Extensibility Elements to the Editor 617
Adding Custom Actions to the WSDL Editor
Design View 627
Extending WSDL Validation 635
Contributing to WSDL 1.1 Validation 636
Contributing Custom Validation Rules 640
Summary 644
Chapter 15 Customizing Resource Resolution 645
Creating the Resource Resolution Extension Plug-in 647
Contributing Resources to the XML Catalog 648
The XML Catalog 650
Adding a Single Resource to the XML Catalog 651
Adding a Catalog of Resources to the XML
Catalog 654
Implementing a Custom Resource Resolution Strategy 657
The URI Resolution Framework 659
Creating the Folder URI Resolver 661
Summary 665
Part IV ❍ Products and Plans 667
Chapter 16 Other Web Tools Based on Eclipse 669
Java Web Tools 669
BEA Workshop 670
CodeGear JBuilder 670
Exadel Studio 670
IBM Rational Application Developer for
WebSphere Software 670
JBoss IDE for Eclipse 671
MyEclipse 672
ObjectWeb Lomboz 672
SAP NetWeaver Developer Studio 672
W4T Eclipse 672
Perl Web Tools 674
EPIC 674
PHP Web Tools 674
Eclipse PHP Development Tools Project 674
PHPEclipse 674
Python Web Tools 675
PyDev 675
Ruby Web Tools 675
RadRails 675
Summary 675
Chapter 17 The Road Ahead 677
Eclipse Data Tools Platform (DTP) Project 678
Eclipse JavaServer Faces (JSF) Tools Project 678
Eclipse Dali Java Persistence Architecture (JPA)
Tools Project 679
Eclipse AJAX Tools Framework (ATF) Project 679
Java Enterprise Edition 5 679
Apache Axis2 and W3C WSDL 2.0 680
Eclipse PHP Development Tools Project 680
Eclipse SOA Tools Platform (STP) Project 681
Conclusion 681
Glossary 683
References 689
Index 697


Download Free Java Software, java.com: Java + You, Eclipse - The Eclipse Foundation open source community website, Eclipse (software) - Wikipedia, the free encyclopedia, java eclipse, java to com, javascript, java tutorial, ide for, how to java code, tutorial for java, the java tutorial

Eclipse Step-by-Step
Eclipse Cookbook
Other Java Books
Other Programming Language Books
Download

Friday, February 10, 2012

Data Structures in Java - A Laboratory Course






Contents
Laboratory 1 Logbook ADT 1
Focus: Implementing an ADT using a Java class
Application: Generating a calendar display
Prelab Exercise 7
Bridge Exercise 13
In-lab Exercise 1 15
In-lab Exercise 2 17
In-lab Exercise 3 19
Postlab Exercise 1 21
Postlab Exercise 2 22
Laboratory 2 Point List ADT 23
Focus: Array implementation of a point list
Application: Displaying a dragon curve
Prelab Exercise 29
Bridge Exercise 34
In-lab Exercise 1 37
In-lab Exercise 2 39
In-lab Exercise 3 43
Postlab Exercise 1 45
Postlab Exercise 2 46
Laboratory 3 String ADT 47
Focus: Java’s built-in String class
Application: Lexical analysis
Prelab Exercise 55
Bridge Exercise 57
In-lab Exercise 1 61
In-lab Exercise 2 65
In-lab Exercise 3 70
Postlab Exercise 1 73
Postlab Exercise 2 74
Laboratory 4 Array Implementation of the List ADT 77
Focus: Array implementation of a list
Application: Analyzing DNA sequences
Prelab Exercise 85
Bridge Exercise 88
In-lab Exercise 1 92
In-lab Exercise 2 94
In-lab Exercise 3 96
Postlab Exercise 1 99
Postlab Exercise 2 101
Laboratory 5 Stack ADT 103
Focus: Array and singly linked list implementations of a stack
Application: Evaluating postfix arithmetic expressions
Prelab Exercise 109
Bridge Exercise 114
In-lab Exercise 1 116
In-lab Exercise 2 117
In-lab Exercise 3 120
Postlab Exercise 1 125
Postlab Exercise 2 128
Laboratory 6 Queue ADT 129
Focus: Array and singly linked list implementations of a queue
Application: Simulating the flow of customers through a line
Prelab Exercise 135
Bridge Exercise 138
In-lab Exercise 1 140
In-lab Exercise 2 142
In-lab Exercise 3 144
Postlab Exercise 1 147
Postlab Exercise 2 148
Laboratory 7 Singly Linked List Implementation of the List ADT 149
Focus: Singly linked list implementation of a list
Application: Slide show program
Prelab Exercise 155
Bridge Exercise 157
In-lab Exercise 1 160
In-lab Exercise 2 162
In-lab Exercise 3 164
Postlab Exercise 1 167
Postlab Exercise 2 169
Laboratory 8 Doubly Linked List Implementation of the List ADT 171
Focus: Circular doubly linked list implementation of a list
Application: Anagram puzzle
Prelab Exercise 177
Bridge Exercise 179
In-lab Exercise 1 181
In-lab Exercise 2 183
In-lab Exercise 3 186
Postlab Exercise 1 189
Postlab Exercise 2 191
Laboratory 9 Ordered List ADT 193
Focus: Array implementation of an ordered list using inheritance
Application: Assembling messages in a packet switching network
Prelab Exercise 199
Bridge Exercise 203
In-lab Exercise 1 205
In-lab Exercise 2 207
In-lab Exercise 3 209
Postlab Exercise 1 211
Postlab Exercise 2 213
Laboratory 10 Recursion with Linked Lists 215
Focus: Using recursion to process and restructure linked lists
Application: Replacing recursion with iteration
Prelab Exercise 223
Bridge Exercise 234
In-lab Exercise 1 238
In-lab Exercise 2 242
In-lab Exercise 3 244
Postlab Exercise 1 247
Postlab Exercise 2 248
Laboratory 11 Expression Tree ADT 249
Focus: Linked implementation of an expression tree
Application: Logic circuits
Prelab Exercise 257
Bridge Exercise 259
In-lab Exercise 1 261
In-lab Exercise 2 264
In-lab Exercise 3 266
Postlab Exercise 1 271
Postlab Exercise 2 273
Laboratory 12 Binary Search Tree ADT 275
Focus: Linked implementation of a binary search tree
Application: Indexed accounts database
Prelab Exercise 281
Bridge Exercise 283
In-lab Exercise 1 285
In-lab Exercise 2 287
In-lab Exercise 3 289
Postlab Exercise 1 295
Postlab Exercise 2 296
Laboratory 13 Heap ADT 299
Focus: Array implementation of a heap
Application: Simulating the flow of tasks in an operating system using a priority queue
Prelab Exercise 307
Bridge Exercise 309
In-lab Exercise 1 311
In-lab Exercise 2 313
In-lab Exercise 3 318
Postlab Exercise 1 323
Postlab Exercise 2 324
Laboratory 14 Weighted Graph ADT 325
Focus: Adjacency matrix implementation of the Weighted Graph ADT
Application: Computation of shortest paths
Prelab Exercise 331
Bridge Exercise 334
In-lab Exercise 1 336
In-lab Exercise 2 339
In-lab Exercise 3 342
Postlab Exercise 1 347
Postlab Exercise 2 349
Laboratory 15 Performance Evaluation 351
Focus: Determining execution times
Application: Analyzing the execution times of sorting and searching routines
Prelab Exercise 357
Bridge Exercise 358
In-lab Exercise 1 360
In-lab Exercise 2 363
In-lab Exercise 3 366
Postlab Exercise 1 369
Postlab Exercise 2 370
Laboratory 16 Team Software Development Project 373
Focus: Object-oriented analysis and design techniques
Application: Create a program that generates an HTML noteboard consisting of a set
of monthly calendars and associated notes
Week 1: Prelab Exercise 1 375
Week 1: Prelab Exercise 2 382
Week 1: Bridge Exercise 390
Week 1: In-lab Exercise 397
Week 2: In-lab Exercise 404
Postlab Exercise 407

Data Structures
Data structure - Wikipedia, the free encyclopedia
Advanced Data Structures
Data Structures and Algorithms with Object-Oriented Design Patterns in Java
Other Core of CS Books
Java Language Reference
Download

Wednesday, January 4, 2012

Cobol Programmers Swing With Java






E. REED DOKE
Southwest Missouri State University
BILL C. HARDGRAVE
University of Arkansas
RICHARD A. JOHNSON
Southwest Missouri State University

Contents
Preface xiii
Introduction 1
Chapter 1
Why You Should Learn Java 3
Objectives 3
History and Overview of Java 4
The Popularity of Java 6
What Makes Java Different? 8
Java Is Simple 8
Java Is Object-Oriented 9
Java Is Portable 10
Will Java Replace COBOL? 12
How to Use This Book 16
Summary of Key Points in Chapter 1 18
Bibliography 19
Chapter 2
An Introduction to Object-Oriented Programming 21
Objectives 21
The Community National Bank 22
History of OO 22
Objects 24
Classes 25
Diagramming Classes and Objects 26
Class Relationships 28
Inheritance 29
Aggregation 32
Association 34
Object Communication 35
Polymorphism 37
Dynamic Binding 38
Summary of Key Points in Chapter 2 39
Bibliography 40
Chapter 3
Java Structure 41
Objectives 41
A Class Program 42
Listing 3.1: Customer.java 44
Java Column Restrictions 47
Writing Comments in Java 47
Naming Rules and Conventions 49
Creating Objects 50
Listing 3.2: Customer.java 53
Invoking Methods 54
Listing 3.3: CustomerProcessor.java 56
Working with Subclasses 58
Listing 3.4: Account.java 58
Listing 3.5: CheckingAccount.java 60
Listing 3.6: AccountProcessor.java 62
Summary of Key Points in Chapter 3 64
Chapter 4
Defining Data 66
Objectives 66
COBOL Picture Clause 67
Defining Java Variables 68
Writing Java Literals 70
The Scope of Variables 71
Defining Java Constants 72
String Variables 72
Listing 4.1: StringDemo.java 74
Changing Variable Types 76
Listing 4.2: CastDemo.java 77
Variables for Community National Bank 79
Summary of Key Points in Chapter 4 80
Chapter 5
Computation 82
Objectives 82
Exceptions 83
Listing 5.1: try-catchStructure 85
Listing 5.2:
ArithmeticExceptionDemo.java 86
Custom Exception Classes 87
Listing 5.3: CheckingAccount.javawith
NSFException 89
Listing 5.4: AccountProcessor.javawith
try-catch 91
A Review of Primitive Data Types 92
Wrapper Classes 93
Listing 5.5: WrapperDemo.java 96
Arithmetic Operators 98
The MathClass 99
Listing 5.6: MathClassDemo.java 103
The NumberFormatClass 104
Listing 5.7: NumberFormatDemo.java 105
Summary of Key Points in Chapter 5 107
Chapter 6
Decision Making 108
Objectives 108
Service Charges at Community National Bank 109
The ifStatement 109
Using the elseClause 112
Nested ifStatements 114
Writing Compound Conditions 115
Java’s Conditional Operator 116
Condition Names 117
Computing the Service Charge with ifStatements 118
Listing 6.1: COBOL Service Charge Computation
Using IFStatements 119
Listing 6.2: ComputeServiceCharge method Using
ifStatements 120
Case Structure: COBOL EVALUATEand Java switch 121
Computing the Service Charge Using switch 123
Listing 6.3: COBOL Service Charge Computation
Using EVALUATE 123
Listing 6.4: Java Service Charge Computation
Using switch 125
Summary of Key Points in Chapter 6 126
Chapter 7
Loops 129
Objectives 129
Loop Structure 130
The COBOL PERFORMStatement 130
The Java whileStatement 132
Listing 7.1: WhileLoopDemo.java 135
The Java doStatement 137
Listing 7.2: DoLoopDemo.java 139
The Java forStatement 140
Listing 7.3: ForLoopDemo.java 142
Nested Loops 143
Java breakand continueStatements 145
Producing a Loan Amortization Schedule 146
Listing 7.4: Amortizer.java 147
Summary of Key Points in Chapter 7 149
Chapter 8
Arrays 151
Objectives 151
Declaring One-Dimensional Arrays 152
Populating One-Dimensional Arrays 155
Creating String Arrays 157
Listing 8.1: OneDimArrayDemo.java 158
Declaring Two-Dimensional Arrays 160
Populating Two-Dimensional Arrays 162
Listing 8.2: TwoDimArrayDemo.java 163
Passing Arrays as Arguments 166
Searching Arrays 167
Listing 8.3: FindZipCode.java 168
Listing 8.4: ZipCodeProcessor.java 169
Summary of Key Points in Chapter 8 171
Chapter 9
Data Access 173
Objectives 173
Java’s I-O Class Library (java.io) 174
Object Persistence 175
Sequential File I-O 175
Listing 9.1: SequentialFileDemo.java 179
Database Access 181
Listing 9.2: COBOL SQL Example 182
Listing 9.3: DatabaseDemo.java 188
Object Serialization 189
Listing 9.4:
ObjectSerializationDemo.java 193
Network Access 195
Summary of Key Points in Chapter 9 195
Chapter 10
Graphical User Interfaces 197
Objectives 197
Java’s Swing Components 198
Event-Driven Programming 199
JFrame: Displaying and Closing a Window 201
Listing 10.1—CustomerGUIOne.java 201
JLabel: Adding Labels to a Window 203
Listing 10.2: CustomerGUITwo.java 203
JTextField: Adding Text Fields to a Window 205
Listing 10.3—CustomerGUIThree.java 206
JButton: Adding Buttons to a Window 209
Listing 10.4—CustomerGUIFour.java 209
How Java Handles Events 213
Improving the Window Layout 214
Listing 10.5: CustomerGUIFive.java 215
Creating Drop-Down Menus 220
Listing 10.6—CustomerGUISix.java 220
Writing Applets 225
Summary of Key Points in Chapter 10 227
Chapter 11
Object-Oriented Development Issues 229
Objectives 229
Developing Object-Oriented Systems 230
OO Methodologies 231
OO Analysis 232
OO Design 233
Three-Tier Design 235
Architecture Issues 246
Performance Issues 247
Summary of Key Points in Chapter 11 248
Bibliography 249
Glossary 251
Index 260

Another Java Books
Download

Tuesday, November 29, 2011

An Introduction to Network Programming with Java






Contents
Chapter 1 Basic Concepts, Protocols and Terminology ......................... 1
1.1 Clients, Servers and Peers ................................................................. 1
1.2 Ports and Sockets .............................................................................. 2
1.3 The Internet and IP Addresses .......................................................... 3
1.4 Internet Services, URLs and DNS .................................................... 4
1.5 TCP ................................................................................................... 5
1.6 UDP .................................................................................................. 7
Chapter 2 Starting Network Programming in Java ............................... 9
2.1 The InetAddress Class ...................................................................... 9
2.2 Using Sockets ................................................................................... 12
2.2.1 TCP Sockets ..... .................................................................... 12
2.2.2 Datagram (UDP) Sockets ....................................................... 18
2.3 Network Programming with GUIs ................................................... 28
2.4 Downloading Web Pages ................................................................. 37
Exercises ................................................................................................... 41
Chapter 3 Multithreading and Multiplexing .......................................... 51
3.1 Thread Basics ................................................................................... 51
3.2 Using Threads in Java ..................................................................... 52
3.2.1 Extending the Thread Class ................................................... 53
3.2.2 Explicitly Implementing the Runnable Interface ...................... 57
3.3 Multithreaded Servers ..................................................................... 60
3.4 Locks and Deadlock ........................................................................ 65
3.5 Synchronising Threads .................................................................... 67
3.6 Non-Blocking Servers ..................................................................... 74
3.6.1 Overview ................................................................................. 74
3.6.2 Implementation ......................................................................... 76
3.6.3 Further Details .......................................................................... 86
Exercises .................................................................................................. 88
Chapter 4 File Handling .......................................................................... 91
4.1 Serial Access Files .......................................................................... 91
4.2 File Methods ................................................................................... 97
4.3 Redirection .................................................................................... 99
4.4 Command Line Parameters ............................................................ 101
4.5 Random Access Files ..................................................................... 102
4.6 Serialisation .................................................................................... 109
4.7 File I/O with GUIs ......................................................................... 113
4.8 Vectors ........................................................................................... 120
4.9 Vectors and Serialisation ............................................................... 123
Exercises ................................................................................................. 132
Chapter 5 Remote Method Invocation (RMI) ...................................... 136
5.1 The Basic RMI Process .................................................................. 136
5.2 Implementation Details .................................................................. 137
5.3 Compilation and Execution ............................................................ 141
5.4 Using RMI Meaningfully ............................................................... 143
5.5 RMI Security .................................................................................. 153
Exercises ................................................................................................. 156
Chapter 6 CORBA ................................................................................... 158
6.1 Background and Basics ................................................................... 158
6.2 The Structure of a Java IDL Specification ...................................... 159
6.3 The Java IDL Process ...................................................................... 163
6.4 Using Factory Objects ..................................................................... 173
6.5 Object Persistence ........................................................................... 184
6.6 RMI-IIOP ........................................................................................ 184
Exercises .................................................................................................. 186
Chapter 7 Java Database Connectivity (JDBC) ................................... 188
7.1 The Vendor Variation Problem ....................................................... 188
7.2 SQL and Versions of JDBC ............................................................ 189
7.3 Creating an ODBC Data Source ..................................................... 190
7.4 Simple Database Access .................................................................. 191
7.5 Modifying the Database Contents ................................................... 199
7.6 Transactions .................................................................................... 203
7.7 Meta Data ........................................................................................ 204
7.8 Using a GUI to Access a Database ................................................. 207
7.9 Scrollable ResultSets in JDBC 2.0 .................................................. 210
7.10 Modifying Databases via Java Methods ......................................... 215
7.11 Using the DataSource Interface ...................................................... 220
7.11.1 Overview and Support Software ............................................ 220
7.11.2 Defining a JNDI Resource Reference ....................................... 222
7.11.3 Mapping the Resource Reference onto a Real Resource ........... 223
7.11.4 Obtaining the Data Source Connection ..................................... 225
7.11.5 Data Access Objects .................................................................. 226
Exercises .................................................................................................. 232
Chapter 8 Servlets .................................................................................... 234
8.1 Servlet Basics .................................................................................... 234
8.2 Setting up the Servlet API ............................................................... 235
8.3 Creating a Web Application ............................................................ 237
8.4 The Servlet URL and the Invoking Web Page ................................ 239
8.5 Servlet Structure ............................................................................... 240
8.6 Testing a Servlet .............................................................................. 242
8.7 Passing Data .................................................................................... 242
8.8 Sessions ........................................................................................... 249
8.9 Cookies ............................................................................................ 260
8.10 Accessing a Database Via a Servlet ................................................ 268
Exercises .................................................................................................. 275
Chapter 9 JavaServer Pages (JSPs) ........................................................ 278
9.1 The Rationale behind JSPs ............................................................... 278
9.2 Compilation and Execution ............................................................. 279
9.3 JSP Tags .......................................................................................... 280
9.4 Implicit JSP Objects ........................................................................ 283
9.5 Collaborating with Servlets ............................................................. 285
9.6 JSPs in Action ................................................................................. 285
9.7 Error Pages ...................................................................................... 291
9.8 Using JSPs to Access Remote Databases ....................................... 294
Exercises .................................................................................................. 295
Chapter 10 JavaBeans ................................................................................ 297
10.1 Introduction to the Bean Builder .................................................... 298
10.2 Creating a JavaBean ....................................................................... 301
10.3 Exposing a Bean's Properties ......................................................... 307
10.4 Making Beans Respond to Events ................................................. 311
10.5 Using JavaBeans within an Application ........................................ 315
10.6 Bound Properties ........................................................................... 317
10.7 Using JavaBeans in JSPs ............................................................... 324
10.7.1 The Basic Procedure ........................................................ 324
10.7.2 Calling a Bean's Methods Directly .................................. 326
10.7.3 Using HTML Tags to Manipulate a Bean's Properties .... 330
Exercises .................................................................................................. 342
Chapter 11 Introduction to Enterprise JavaBeans ................................. 345
11.1 Categories of EJB ........................................................................... 345
11.2 Basic Structure of an EJB ............................................................... 346
11.3 Packaging and Deployment ............................................................ 349
11.4 Client Programs .............................................................................. 351
11.5 Entity EJBs ..................................................................................... 353
Chapter 12 Multimedia ............................................................................. 359
12.1 Transferring and Displaying Images Easily ................................... 360
12.2 Transferring Media Files ................................................................ 365
12.3 Playing Sound Files ....................................................................... 370
12.4 The Java Media Framework ........................................................... 372
Exercises ................................................................................................. 379
Chapter 13 Applets ................................................................................... 380
13.1 Applets and JApplets ...................................................................... 380
13.2 Applet Basics and the Development Process ................................. 381
13.3 The Internal Operation of Applets .................................................. 385
13.4 Using Images in Applets ................................................................ 392
13.4.1 Using Class Image ........................................................... 392
13.4.2 Using Class ImageIcon .................................................... 397
13.5 Scaling Images ................................................................................ 400
13.6 Using Sound in Applets .................................................................. 401
Exercises .................................................................................................. 405
Appendix A Structured Query Language (SQL) ............................. 406
Appendix B Deployment Descriptors for EJBs ................................ 411
Appendix C Further Reading ............................................................. 414
Index ............................................................................................................. 417

Another Java Books

Another Network Books
Download

Saturday, August 27, 2011

A Java Library of Graph Algorithms and Optimization






Contents
INTRODUCTION ....................................................................................... 1
1. RANDOM GRAPH GENERATION....................................................... 3
1.1 Random Permutation of n Objects ........................................................................................ 3
1.2 Random Graph........................................................................................................................ 4
1.3 Random Bipartite Graph........................................................................................................ 7
1.4 Random Regular Graph ....................................................................................................... 10
1.5 Random Spanning Tree....................................................................................................... 14
1.6 Random Labeled Tree ......................................................................................................... 16
1.7 Random Unlabeled Rooted Tree......................................................................................... 18
1.8 Random Connected Graph................................................................................................... 21
1.9 Random Hamilton Graph..................................................................................................... 24
1.10 Random Maximum Flow Network .................................................................................... 27
1.11 Random Isomorphic Graphs.............................................................................................. 31
1.12 Random Isomorphic Regular Graphs ............................................................................... 34
2. CONNECTIVITY................................................................................. 37
2.1 Maximum Connectivity ........................................................................................................ 37
2.2 Depth-First Search ................................................................................................................ 39
2.3 Breadth-First Search............................................................................................................. 43
2.4 Connected Graph Testing..................................................................................................... 47
2.5 Connected Components ........................................................................................................ 50
2.6 Cut Nodes............................................................................................................................... 55
2.7 Strongly Connected Components ........................................................................................ 61
2.8 Minimal Equivalent Graph .................................................................................................. 65
2.9 Edge Connectivity ................................................................................................................. 73
2.10 Minimum Spanning Tree.................................................................................................... 75
2.11 All Cliques............................................................................................................................ 81
3. PATHS AND CYCLES ....................................................................... 89
3.1 Fundamental Set of Cycles ................................................................................................... 89
3.2 Shortest Cycle Length........................................................................................................... 93
3.3 One-Pair Shortest Path......................................................................................................... 96
3.4 All Shortest Path Length .................................................................................................... 102
3.5 Shortest Path Tree............................................................................................................... 105
3.6 All Pairs Shortest Paths ...................................................................................................... 109
3.7 k Shortest Paths................................................................................................................... 112
3.8 k Shortest Paths without Repeated Nodes ........................................................................ 123
3.9 Euler Circuit ........................................................................................................................ 142
3.10 Hamilton Cycle .................................................................................................................. 146
3.11 Chinese Postman Tour...................................................................................................... 151
3.12 Traveling Salesman Problem ........................................................................................... 173
4. PLANARITY TESTING..................................................................... 179
5. GRAPH ISOMORPHISM TESTING ................................................. 195
6. COLORING ...................................................................................... 207
6.1 Node Coloring...................................................................................................................... 207
6.2 Chromatic Polynomial ........................................................................................................ 212
7. GRAPH MATCHING ........................................................................ 221
7.1 Maximum Cardinality Matching....................................................................................... 221
7.2 Minimum Sum Perfect Matching ...................................................................................... 225

8. NETWORK FLOW ........................................................................... 243
8.1 Maximum Network Flow.................................................................................................... 243
8.2 Minimum Cost Network Flow............................................................................................ 254
9. PACKING AND COVERING ............................................................ 273
9.1 Assignment Problem ........................................................................................................... 273
9.2 Bottleneck Assignment Problem ........................................................................................ 280
9.3 Quadratic Assignment Problem.......................................................................................... 284
9.4 Multiple Knapsack Problem .............................................................................................. 304
9.5 Set Covering Problem ......................................................................................................... 323
9.6 Set Partitioning Problem .................................................................................................... 325
10. LINEAR PROGRAMMING ............................................................. 329
10.1 Revised Simplex Method .................................................................................................. 329
10.2 Dual Simplex Method ....................................................................................................... 334
11. INTEGER PROGRAMMING........................................................... 341
11.1 Zero-One Integer Programming...................................................................................... 341
11.2 All Integer Programming ................................................................................................ 347
11.3 Mixed Integer Programming........................................................................................... 351
12. QUADRATIC PROGRAMMING ..................................................... 371
APPENDIX A: REFERENCES ............................................................ 377
APPENDIX B: GRAPH-THEORETIC TERMS .................................... 383

Another The Core of CS Books
Another Java Books
Download

Friday, August 26, 2011

Introduction to Programming Using Java






Author: David J. Eck (eck@hws.edu)

WELCOME TO Introduction to Programming Using Java, an on-line textbook on introductory programming, which uses Java as the language of instruction. This text has more than enough material for a one-semester course, and it is also suitable for individuals who want to learn programming on their own. This is the third edition of the text. (Version 3.1 is a minor upgrade of Version 3.0, which was released in May, 2000. Version 3.1 was released in February 2001 and incorporated a few changes and corrections. A final packaging of Version 3.1 was released in June 2004, incorporating corrections made since the release of Version 3.1. This version is released under the Open Publication License.) The third edition covers more material and has more examples than the second edition. It also adds end-of-chapter quizzes and solved programming exercises. Previous editions have been used in a course, Computer Science 124: Introductory Programming, at Hobart and William Smith Colleges. (The title of the previous editions included a reference to this course.) This textbook covers Java 1.1. Most of the applets that are contained in the text require Java 1.1 or higher.

Short Table of Contents:

Full Table of Contents
Preface
Preface to the Second Edition
Chapter 1: Overview: The Mental Landscape
Chapter 2: Programming in the Small I: Names and Things
Chapter 3: Programming in the Small II: Control
Chapter 4: Programming in the Large I: Subroutines
Chapter 5: Programming in the Large II: Objects and Classes
Chapter 6: Applets, HTML, and GUI's
Chapter 7: Advanced GUI Programming
Chapter 8: Arrays
Chapter 9: Correctness and Robustness
Chapter 10: Advanced Input/Output
Chapter 11: Linked Data Structures and Recursion
Appendix 1: From Java to C++
Appendix 2: Some Notes on Java Programming Environments
Appendix 3: Source code for all examples in the text
News and Errata

Another Java Books
Another Programming Language Books
Download

Wednesday, August 10, 2011

The JNDI Tutorial






Getting Started
The Basics
Beyond the Basics
Java Objects and the Directory
Tips for LDAP Users
Building a Service Provider

Getting Started
Naming and Directory Concepts
Naming Concepts
Directory Concepts
Directory-Enabled Java Applications
Glossary
JNDI Overview
Naming Package
Directory Package
Event Package
LDAP Package
Service Provider Package
Examples
Naming Example
Directory Example
Common Problems (and Their Solutions)
Compilation Problems
Runtime Problems
Web Browser Problems
The Basics
Preparations
Required Software
Contents of the Directory
Packages and Classpath
Naming Exceptions
The Initial Context
Names
Naming Operations
Looking Up an Object
Listing a Context
Adding, Replacing, and Removing a Binding
Renaming an Object
Creating and Destroying a Context
Directory Operations
Attribute Names
Reading Attributes
Modifying Attributes
Searching the Directory
Basic Search
Search Filters
Search Controls
Search Scope
Count Limit
Time Limit
Hybrid Naming and Directory Operations
Beyond the Basics
What's in a Name?
String Names versus Structured Names
Composite Names
Compound Names
Name Parsers
Handling Special Characters
Dynamic Name Composition
Environment Properties
Overview
Specifying Environment Properties
A Context's Environment
Customizing a Service Provider
Event Notification
Event Listeners
Listener Registration
Naming Events
LDAP Unsolicited Notifications
URLs
URLs as Names to the Initial Context
URLs as Names Returned by Enumerations
URLs as References for Federation
URLs as Data for Configuration
Federation
Naming System Boundaries
The Current Naming System
The Next Naming System
Miscellaneous
Class Loading
Link Reference
Naming Policies
Threads and Synchronization
Security
Java Objects and the Directory

Storing Objects in the Directory
Serializable Objects
Referenceable Objects and References
Objects with Attributes
Remote Objects
CORBA Objects
State Factories
Writing a State Factory
Interaction Between State Factories and Service Providers
Examples
Reading Objects from the Directory
Lookups
Lists
Searches
Object Factories
Writing an Object Factory
Other Uses
Interaction Between Object Factories and Service Providers
Examples
Representation in the Directory
LDAP Directories
File System

Tips for LDAP Users

Comparison of the LDAP and JNDI Models
X.500 Overview
LDAP v2
LDAP v3
JNDI Mapping
LDAP Operations and JNDI Mapping
LDAP Status Codes and JNDI Exceptions
Security
LDAP Authentication
Authentication Mechanisms
Anonymous Authentication
Simple Authentication
SASL Authentication
Digest-MD5 Authentication
CRAM-MD5 Authentication
Callbacks for SASL Mechanisms
GSS-API/Kerberos v5 Authentication
Using Arbitrary SASL Mechanisms
SSL and Custom Sockets
Miscellaneous
Protocol Versions
Attributes
Dereferencing Aliases
Renaming Objects
Storing Objects
LDAP & LDAPS URLs
Searches
Context Search Methods
Other Context Methods
The LDAP "Compare" Operation
Search Results
Batch Size
Referrals
Referrals in the LDAP
Referrals in the JNDI
Ignoring Referrals
Automatically Following Referrals
Manually Following Referrals
Creating and Updating Referrals
Schema
Overview
Schema in the JNDI
Object Class Definitions
Attribute Type Definitions
Attribute Syntax Definitions
Attribute Matching Rule Definitions
Two Practical Examples
Controls and Extensions
Controls
Request Controls
Context Request Controls
Connection Request Controls
Response Controls
"Extended" Operations
The Start TLS Extension
Connections
Connection Creation
Connection Closure
Connection Pooling
Connection Pooling Configuration
Frequently Asked Questions
Contexts
Attributes
Searches
Names

Building a Service Provider

The Big Picture
Essential Components
Optional Components
Advanced Features
The Ground Rules
Parameters and Return Values
Environment Properties
Names
Threads and Synchronization
Security Considerations
The Essential Components
Implementing a Context Implementation
Names
Lookup Methods
List Methods
Update Methods
Name Parser
More Names
Miscellaneous
Building in Extensibility
Implementing an Initial Context Factory
Adding Directory Support
Attribute Retrieval
Attribute Updates
Hybrid Naming and Directory Operations
Searches
Schema
Building in Extensibility
Adding URL Support
URL Context Factory
URL Context Implementation
Supporting Subinterfaces
Making the Implementation Available
Relationship to the Initial Context
Relationship to References
Adding Federation Support
Naming System Boundaries
The Current Naming System
The Next Naming System
Resolving through Subinterfaces
Creating a Federation
Miscellaneous
Packaging
Adding Referral Support
Adding Link Reference Support
Adding Event Notification Support
Adding Support for Controls and Extensions

Another Java Books
Another Programming Language
Download

Monday, August 8, 2011

Java Developer's Reference






By Mike Cohn, Bryan Morgan, Michael Morrison, Michael T. Nygard, Dan Joshi, Tom Trinko


Chapter 1 Introduction to Java

What Is Java?
Java as an Internet Language
Java as a General-Purpose Language
Applications and Applets
Features of the Java Language
Simple
Object-Oriented
Distributed
Interpreted
Robust
Secure
Architecture-Neutral
Portable
High-Performance
Multithreaded
Dynamic
The Java Tools
Compiler
Interpreter
Debugger
Disassembler
Header File Generator
JavaDoc
Applet Viewer
Java-Enabled Browsers
HotJava
Netscape
Summary

Chapter 2 Installing Java

Getting Started with the Java Developer's Kit
JDK Installation Notes
Sun Solaris Installation Notes
Windows 95 and Windows NT Installation Notes
Apple Macintosh System 7.5 Installation Notes
Testing the Installation
Exploring the Java Developer's Kit
Distributing the Java Virtual Machine
Other Development Environments
SunSoft Java Workshop for Sun Solaris and Microsoft Windows 95/NT
Symantec Café for Microsoft Windows 95/NT and Apple Macintosh
Borland Latte for Microsoft Windows 95/NT
Microsoft Visual J++ for Microsoft Windows 95/NT
Summary

Chapter 3 The Java Language

Comments
Java Keywords
Primitive Types
Integer Types
Floating-Point Types
Other Primitive Types
Default Values
Casting Between Primitive Types
Literals
Integer Literals
Floating-Point Literals
Boolean Literals
Character Literals
String Literals
Arrays
Allocation
Initialization
Array Access
Operators
Operators on Integers
Operators on Floating-Point Values
Operators on Boolean Values
Controlling Your Program
Selection
Iteration
Jumping
Java Classes
Field Declarations
Class Inheritance
Overriding Member Methods
The super Variable
Class Modifiers
Implementing Interfaces
Summary

Chapter 4 Java for C++ Programmers

Data Types
Primitive Types
Casting
Operators
Pointers
Structures and Unions
Arrays
Automatic Memory Management
Classes
Member Methods
Setting Default Values
Static Members
Constructors and Destructors
Inheritance
The Preprocessor
Other Changes
Comments
Command-Line Arguments
Character Arrays and Strings
goto, break, and continue
Runtime Type Identification
Missing Features
Summary

Chapter 5 Java for Delphi Programmers

Comments
The End of begin and end
Data Types
Declaring Variables
Primitive Types
Casting
Operators
Pointers
Records
Arrays
Memory Management
Garbage Collection
Classes
Member Methods
Setting Default Values
Static Members
Constructors and Destructors
Inheritance
Other Changes
Command-Line Arguments
Parentheses Are Required
The Java for Statement
goto, break, and continue
Summary


Chapter 6 Java for Visual Baisc Programmers

Visual Basic versus Java, or Object-Based versus Object-Oriented
Encapsulation
Inheritance
Polymorphism
Comparing ActiveX to Java Classes
Understanding Java Program Flow
The Applet Life Cycle
Language Features and Syntax
Data Types
Declaring Variables
Programming Constructs
Language Features Missing from Visual Basic
Summary


Another Java Books
Another Programming Language Books
Download

Saturday, August 6, 2011

Exploring Java







Exploring Java
By Patrick Niemeyer & Joshua Peck; 1-56592-184-271-9, 500 pages (est.)
2nd Edition July 1997 (est.)

Table of Contents

Preface
Chapter 1: Yet Another Language?
Chapter 2: A First Applet
Chapter 3: Tools of the Trade
Chapter 4: The Java Language
Chapter 5: Objects in Java
Chapter 6: Threads
Chapter 7: Basic Utility Classes
Chapter 8: Input/Output Facilities
Chapter 9: Network Programming
Chapter 10: Understand the Abstract Windowing Toolkit
Chapter 11: Using and Creating GUI Components
Chapter 12: Layout Managers
Chapter 13: Drawing With the AWT
Chapter 14: Working With Images
Glossary
Index


Another Java Books
Another Programming Language Books
Download

Java Fundamental Classes Reference






Java Fundamental Classes Reference
By Mark Grand and Jonathan Knudsen; 1-56592-241-7, 1152 pages
1st Edition May 1997

Table of Contents

Preface
Chapter 1: Introduction
Part I: Using the Fundamental Classes

This part of the book, Chapters 2 through 10, provides a brief guide to many of the features of the fundamental classes in Java. These tutorial-style chapters are meant to help you learn about some of the basic functionality of the Java API. They provide short examples where appropriate that illustrate the use of various features.

Chapter 2: Strings and Related Classes
Chapter 3: Threads
Chapter 4: Exception Handling
Chapter 5: Collections
Chapter 6: I/O
Chapter 7: Object Serialization
Chapter 8: Networking
Chapter 9: Security
Chapter 10: Accessing the Environment
Part II: Reference

This part of the book is a complete reference to all of the fundamental classes in the core Java API. The material is organized alphabetically by package, and within each package, alphabetically by class. The reference page for a class tells you everything you need to know about using that class. It provides a detailed description of the class as a whole, followed by a complete description of every variable, constructor, and method defined by the class.

Chapter 11: The java.io Package
Chapter 12: The java.lang Package
Chapter 13: The java.lang.reflect Package
Chapter 14: The java.math Package
Chapter 15: The java.net Package
Chapter 16: The java.text Package
Chapter 17: The java.util Package
Chapter 18: The java.util.zip Package

Part III: Appendixes

This part provides information about the Unicode 2.0 standard and the UTF-8 encoding used by Java.

Appendix A: The Unicode 2.0 Character Set
Appendix B: The UTF-8 Encoding

Index

Another Java Books
Another Programming Language Books
Download

Java Language Reference






By Mark Grand; 1-56592-326-X, 475 pages
2nd Edition July 1997

Table of Contents

Preface
Chapter 1: Introduction
Chapter 2: Lexical Analysis
Chapter 3: Data Types
Chapter 4: Expressions
Chapter 5: Declarations
Chapter 6: Statements and Control Structures
Chapter 7: Program Structure
Chapter 8: Threads
Chapter 9: Exception Handling
Chapter 10: The java.lang Package
Appendix A: The Unicode 2.0 Character Set
Index


Another Java Books
Another Programming Language
Download

Friday, August 5, 2011

Java in a Nutshell





Java in a Nutshell
By David Flanagan; 1-56592-262-X, 628 pages.
2nd Edition, May 1997

Table of Contents

Preface

Part I: Introducing Java
Part I is an introduction to Java and Java programming. If you know how to program in C or C++, these chapters teach you everything you need to know to start programming with Java.

If you are already familiar with Java 1.0 you may want to just skip ahead to Part II, which introduces the new features of Java 1.1.
Chapter 1: Getting Started with Java
Chapter 2: How Java Differs from C
Chapter 3: Classes and Objects in Java

Part II: Introducing Java 1.1
The two chapters in this part introduce the new features of Java 1.1. Chapter 4 is an overview of the new APIs, and Chapter 5 explains the new language syntax. See Part III for some examples of the new features.
Chapter 4: What's New in Java 1.1
Chapter 5: Inner Classes and Other New Language Features

Part III: Programming with the Java 1.1 API
Part III contains examples of programming with the new features of Java 1.1. You can study and learn from the examples, and you should feel free to adapt them for use in your own programs. The examples shown in these chapters may be downloaded from the Internet. See http://www.ora.com/catalog/books/javanut2/. Some of the chapters in this part also contain tables and other reference material for new features in Java 1.1.

Part III of this book is "deprecated." Most of the examples from the first edition of this book do not appear here, and Part III may disappear altogether in the next edition of the book. Unfortunately, as Java continues to grow, there is less and less room for programming examples in this book. However, all of the examples from the first edition are still available on the Web page listed above.
Chapter 6: Applets
Chapter 7: Events
Chapter 8: New AWT Features
Chapter 9: Object Serialization
Chapter 10: Java Beans
Chapter 11: Internationalization
Chapter 12: Reflection

Part IV: Java Language Reference
Part IV contains reference material on the Java language and related topics. Chapter 13 contains a number of useful summary tables of Java syntax. Chapter 14 describes the standard Java system properties and how to use them. Chapter 15 covers the syntax of the HTML tags that allow you to include Java applets in Web pages. Chapter 16 documents the command-line syntax for the Java compiler, interpreter, and other tools shipped with the JDK.
Chapter 13: Java Syntax
Chapter 14: System Properties
Chapter 15: Java-Related HTML Tags
Chapter 16: JDK Tools

Part V: API Quick Reference
Part V is the real heart of this book: quick-reference material for the Java API. Please read the following section, How to Use This Quick Reference, to learn how to get the most out of this material.
How to Use This Quick Reference
Chapter 17: The java.applet Package
Chapter 18: The java.awt Package
Chapter 19: The java.awt.datatransfer Package
Chapter 20: The java.awt.event Package
Chapter 21: The java.awt.image Package
Chapter 22: The java.awt.peer Package
Chapter 23: The java.beans Package
Chapter 24: The java.io Package
Chapter 25: The java.lang Package
Chapter 26: The java.lang.reflect Package
Chapter 27: The java.math Package
Chapter 28: The java.net Package
Chapter 29: The java.text Package
Chapter 30: The java.util Package
Chapter 31: The java.util.zip Package
Chapter 32: Class, Method, and Field Index

Index

Another Java Books
Another Programming Language Books
Download

Monday, August 1, 2011

Tricks of the Java Programming Gurus






by Glenn L. Vanderburg. et al.


C O N T E N T S

Introduction
Chapter 1 Communication Between Applets

getApplet: The "Official" Mechanism
Static Variables and Methods
Network Communication
Thread-Based Communication
Summary

Chapter 2 Using the Media Tracker

Java Media Objects and the Internet
Keeping Up with Media Objects
The MediaTracker Class
Tracking Images with the Media Tracker
Tracking Other Types of Media
Summary

Chapter 3 Exploiting the Network

Retrieving Data Using URLs
Posting Data to a URL
Communication Using Sockets
Summary

Chapter 4 Using Java's Audio Classes

Digital Audio Fundamentals
Java Audio Support
Playing Audio In Java
The Future of Java Audio
Summary

Chapter 5 Building Special-Purpose I/O Classes

Stream Classes
Non-Stream I/O Classes
Highly Structured Files
Summary

Chapter 6 Effective Use of Threads

Using Threads
Performance
Inside Threads
Summary

Chapter 7 Concurrency and Synchronization

Concurrency
Monitors
Advanced Monitor Concepts
Synchronization
A Thread Coordination Example
Advanced Thread Coordination
Summary

Chapter 8 All About GridBaglayout and Other Layout managers

Automated Layout and the AWT Layout Manager
Basic Layout Classes
The GridBagLayout Class
Creating Your Own Layout Manager
Summary

Chapter 9 Extending AWT Components

Components-an Overview
New Components from Old
A Self-Validating TextField
A Multi-State Toggle Button
Overview
Summary

Chapter 10 Combining AWT Components

Component, Container, Panel
E Pluribus Unum: Out of Many-One
Panels Are Components Too
Layouts
Whose Event Is It Anyway?
The Panel as a Component Manager
A Scrolling Picture Window Example
Overview
Class Construction
Event Handling
Summary

Chapter 11 Advanced Event Handling

Basic Event Handling
The Event Class
Key Events
Mouse Events
Displaying Events
Events with Methods
Generating Events
Fixing Broken Event Handling
A Complete Example
Major Surgery to the Event Model
Summary

Chapter 12 Image Filters and Color Models

Understanding Color
Color Images in Java
Color Models
The Color Model Classes
Working with Color Models
Image Filters
The Image Filter Classes
Writing Your Own Image Filters
Using Image Filters
Summary

Chapter 13 Animation Techniques

What Is Animation?
Types of Animation
Implementing Frame Animation
Eliminating Flicker
Implementing Sprite Animation
Testing the Sprite Classes
Summary

Chapter 14 Writing 2D Games

2D Game Basics
Scaling an Object
Translating an Object
Rotating an Object
2D Game Engine
The Missile Class
Asteroids
The Asteroids Applet Class
The Asteroids
The Ship
The Photons
Final Details
Summary

Chapter 15 A Virtual Java-Creating Behaviors in VRML 2.0

Going Beyond Reality
Making the World Behave
Overview of VRML
The VRML Script Node
VRML Datatypes in Java
Integrating Java Scripts with VRML
The Browser Class
The Script Execution Model
Creating Efficient Behaviors
Dynamic Worlds-Creating VRML on the Fly
Creating Reusable Behaviors
The Future: VRML, Java, and AI
Summary

Chapter 16 Building STand-Alone Applications

Writing and Running a Java Program
Properties
Application Instances
The BloatFinder Application
Using Java's Special Features
Summary

Chapter 17 Network-Extensible Applications with Factory Objects

How Factories Work
Factory Support in the Java Library
Factory Object Implementation Considerations
Supporting a New Kind of Factory
Security Considerations
Summary

Chapter 18 Developing Database Applications and Applets

Storing Data for the Web
Providing Access to Data
The JDBC API
Simple Database Access Using the JDBC Interfaces
Result Sets and the Meta-Data Interfaces
Other JDBC Functionality
Building a JDBC Implementation
Extending JDBC
Designing a Database Application
Summary

Chapter 19 Persistence

What Is Persistence?
Forms of Persistence (in Java)
Implementing a Simple File-Based Persistent Store
The PersistentJava (PJava) Project
Summary

Chapter 20 A User's View of Security

Users Need to Understand
The Kinds of Attacks
Which Resources Are Dangerous?
Cultural Change
Summary

Chapter 21 Creating a Security Policy

The Java Security Model
The Java Security Manager
Security Manager Decisions
Which Resources Are Protected?
Understanding Security Risks
Keeping the Security Policy Manageable
Implementing Class Loaders
Implementing Security Managers
Summary

Chapter 22 Authentication, Encryption, and Trusted Applets

Cryptography Basics
Security Mechanisms Provided by java.security
Enabling Trusted Applets
Cryptographic Security Solves Everything, Right?
Summary

Chapter 23 Pushing the Limits of Java Security

Introducing Hostile Applets
Challenges for the Hacker
A Very Noisy Bear
A Gluttonous Trio
Throw Open a Window
Survival of the Fittest, Applet Style
Port 25, Where Are You?
A Java Factoring-By-Web Project
Summary

Chapter 24 Integrated Development Environments

The Examples Used in This Chapter
Symantec's Cafe Lite
ED for Windows, The Java IDE
Object Engineering Workbench
Comparison of Environments
Other Products Under Development
Summary

Chapter 25 Class Organization and Documentation

Java Packages
Documentation Generation Using javadoc
Class Dissassembly Using javap
Summary

Chapter 26 The Java Debugging API

Remote Debugging
Java Debugger
The Sun Java Debugger API
Simple Types
Some Examples
Summary

Chapter 27 Alternatives to Java

Nuts and Bolts Languages
General-Purpose Languages
Scripting Languages
Secure Languages
Summary

Chapter 28 Moving C and C++ Code to Java

File Organization
The Preprocessor
Structures and Unions
Functions and Methods
Procedural-to-OOP Conversion
Operator Overloading
Automatic Coercions
Command-Line Arguments
I/O Streams
Strings
Pointers
Multiple Inheritance
Inheritance Syntax
Access Modifiers
Friends and Packages
Booleans
Summary

Chapter 29 Using Tcl with Java

Introduction to Tcl
What Does This Have to Do with Java?
The TclJava API
User Menu Configuration
Other Useful Roles for Tcl
Tcl Extension Packages
Summary

Chapter 30 When and Why to Use Native Methods

What Is a Native Method?
Uses for Native Methods
Benefits and Trade-Offs
How Does This Magic Work?
Summary

Chapter 31 The Native Method Interface

A Java Class with Native Methods
Accepting and Returning Java Classes
Accessing Arrays of Classes
Accessing a Float Array
Summary

Chapter 32 Interfacing to Existing C and C++ Libraries

Interfacing to Legacy C Libraries
Developing Java Interface Class Libraries with Legacy C++ Libraries
Special Concerns and Tips
Summary

Chapter 33 Securing Your Native Method Libraries

Security in Native Method Libraries
Avoiding the Problem
Identifying Security-Sensitive Resources
Security Checks
Language Protection Mechanisms
Summary

Chapter 34 Client/Server Programming

Java's Suitability for Client/Server Programming
Client and Servers
Merging the Client and Server
Java's Deployable Code Advantage
Java TCP/IP Sockets
Using Datagram for UDP Sockets
Using Socket and ServerSocket for TCP Sockets
Summary

Chapter 35 Taking Advantage of the Internet in Development

Ending the Isolation of the pc
Working and Playing in Groups
Creating and Using Resource Libraries
Distributing and Maintaining Software
Creating Alternative Revenue Schemes
Summary

Chapter 36 Fulfilling the Promise of Java

The Java Ideals
The Java Community
Setting Your Sights

Appendix A API Quick Reference

java.applet
java.awt
java.awt.image
java.awt.peer
java.io
java.lang
java.net
java.util

Appendix B Class Hierarchy Diagrams

Credits


Another Java Books
Another Programming Language Books
Download
Related Posts with Thumbnails

Put Your Ads Here!