More Ebooks:

Hack Proofing Your Network Internet Tradecraft

Hack Proofing Windows 2000 Server

Hack Proofing Linux

Flash MX Tutorials

Firework and Dreamweaver Tutorial

E-Mail Virus Protection Handbook

Distributed Applications with Microsoft Visual Basic 6.0 MCSD Training Kit For Exam 70-175

Developing XML Solutions

Developing User Interfaces for MS Windows

Developing Professional Java Applets

find on eBook ToC:

Hacking Java: The Java Professional's Resource Kit

Hacking Java: The Java Professional

Mark Wutka, Que Pub

ISBN:078970935X, Edition: , 1996-11

Price: $59.99 C  O  N  T  E  N  T  S

Introduction

Chapter 1    What Is Java?

  • Java as a Web Programming Language
  • Java as an Applications Programming Language
  • New Features on the Horizon
  • Java as an Embedded Systems Language

Chapter 2    Embedding Applets in Web Pages

  • No Java? No Problem
    • Displaying an Image in Place of an Applet
  • Passing Parameters to Applets
  • Improving Applet Startup Time

Chapter 3    Applet Security Restrictions

  • Applet Security
  • File Access Restrictions
  • Network Restrictions
  • Other Security Restrictions
  • Getting Around Security Restrictions
    • Using Digital Signatures for Increased Access
    • Creating a Customized Security Manager

Chapter 4    Displaying Images

  • Images in Java
  • Displaying Simple Images
    • Shrinking and Stretching Images
  • Creating Your Own Images
  • Displaying Other Image Formats
    • The Microsoft Windows Bitmap (BMP) File Format
  • Manipulating Images
    • Performing Image-Processing Algorithms
  • Filtering Image Colors
    • Filtering Based on Pixel Position
  • Downloading Images

Chapter 5    Animating Images

  • Animation
  • An Animation Driver
  • Animating Image Sequences
  • Animating Portions of an Image
  • Animating with a Filter
  • Cycling the Color Palette
  • Animating Graphics
    • Redrawing the Entire Screen
    • Doing Animation with XOR
  • Eliminating Flicker
    • Double-Buffering

Chapter 6    Communicating with a Web Server

  • Java and Web Servers
  • Getting Files Using the URL Class
  • Getting Files Using Sockets
  • Performing a Query with GET
  • Posting Data with the URL Class
  • Posting Data Using Sockets
  • Supporting the Cookie Protocol

Chapter 7    Creating Smarter Forms

  • Smarter Forms
  • Creating Forms with the AWT
  • Checking for Errors on the Client Side
  • Adding Context-Sensitive Help
  • Creating Dynamic Forms
  • Loading Another URL from an Applet
  • Creating Image Maps with Hot Spots

Chapter 8    Reading and Writing Files from an Applet

  • Applets and Files
  • Using the JFS Filesystem for Applets
    • Printing Files Using JFS
    • Accessing Other Web Servers from JFS
  • Saving Files Using HTTP Post
  • Storing and Retrieving Files with FTP
    • Sending FTP Commands
    • Establishing an FTP Session
    • Sending Simple FTP Commands
    • Establishing a Data Connection

Chapter 9    Creating Reusable Graphics Components

  • Reusable Components
  • The Command Pattern
    • Invoking Commands from a Menu
  • Creating a Reusable Image Button
    • Setting the Size of a Canvas
    • Handling Input Events
    • Painting the Canvas
    • Watching for Image Updates
    • Creating a CommandImageButton
  • Using the Observer Interface
    • The Model-View-Controller Paradigm
    • Observables and the Model-View-Controller Paradigm
  • Using Observables for Other Classes

Chapter 10    Inter-Applet Communication

  • Locating Other Applets
  • Exchanging Data Using Piped Streams
  • Creating Multi-Client Pipes
  • Sharing Information with Singleton Objects

Chapter 11    Sending E-Mail from an Applet

  • Sending E-Mail
  • Sending E-Mail Using the SMTP Protocol
  • Accessing Your Mailbox with the POP3 Protocol

Chapter 12    Protecting Applet Code

  • Protecting Your Code from Unauthorized Use
  • Embedding Copyrights in Your Code
  • Verifying the Origin of the Applet
  • Hiding Information in Your Applet
  • Obfuscating a Working Program
    • Make All Your Function and Variable Names Meaningless
    • Perform Occasional Useless Computations or Loops
    • Hide Small Numbers in Strings
    • Create Large Methods
    • Spread Methods Out Among Subclasses
    • Using a Commercial Obfuscator

Chapter 13    Running Applets as Applications

  • Differences Between Applets and Applications
  • Allowing an Applet to Run as an Application
  • The Applet's Runtime Environment
  • Creating an Applet Context

Chapter 14    Creating Your Own Class Archive Files

  • Class Archive Files
  • Creating Your Own Archive File with Info-ZIP
  • Viewing the Contents of a Zip Archive
  • Adding Classes Directly to the Browser's Library
  • Creating Class Archives with Other Zip Archivers
  • Creating Cabinet Files for Internet Explorer

Chapter 15    Accessing Databases with JDBC

  • Organizing Your Data for a Relational Database
    • Using SQL
    • Combining Data from Multiple Tables Using Joins
  • Designing Client/Server Database Applications
    • Client/Server System Tiers
    • Handling Transactions
    • Dealing with Cursors
    • Replication
    • How Does JDBC Work?
    • JDBC Security Model
    • Accessing ODBC Databases with the JDBC-ODBC Bridge
    • JDBC Classes-Overview
    • Anatomy of a JDBC Application
    • JDBC API Examples
  • The Connection Class
  • Handling SQL Statements
    • Creating and Using Direct SQL Statements
    • Creating and Using Compiles SQL Statements (PreparedStatement)
    • Calling Stored Procedures (CallableStatement)
  • Retrieving Results in JDBC
  • Handling Exceptions in JDBC-SQLException Class
  • Handling Exceptions in JDBC-SQLWarnings Class
  • Handling Date and Time
    • java.sql.Date
    • java.sql.Time
    • java.sql.Timestamp
  • Handling SQL Types
    • java.sql.Types
  • JDBC in Perspective

Chapter 16    Creating 3-Tier Distributed Applications with RMI

  • Creating 3-Tier Applications
  • RMI Features
  • Creating an RMI Server
    • Defining a Remote Interface
    • Creating the Server Implementation
    • Creating the Stub Class
  • Creating an RMI Client
  • Creating Peer-to-Peer RMI Applications
  • Garbage Collection, Remote Objects, and Peer-to-Peer

Chapter 17    Creating CORBA Clients

  • Defining IDL Interfaces
  • Compiling IDL Interfaces for Java Clients
  • Writing a Client Applet
  • Handling Exceptions
  • CGI Programs, Java.net.*, and Java.io.* May Not Be the Best Choices
  • Using the Dynamic Invocation Interface and the Interface Repository
  • Using Filters
  • Some Points About Distributed System Architecture

Chapter 18    Using CORBA IDL with Java

  • What Is CORBA?
  • Sun's IDL to Java Mapping
    • IDL Modules
    • IDL Constants
    • IDL Data Types
    • Enumerated Types
  • Structures
    • Unions
    • Sequences and Arrays
    • Exceptions
    • Interfaces
    • Attributes
  • Using CORBA in Applets
    • Choosing Between CORBA and RMI
  • Creating CORBA Clients with JavaIDL
  • Creating CORBA Clients with VisiBroker

Chapter 19    Creating CORBA Servers

  • Creating a Basic CORBA Server
    • Using Classes Defined by IDL Structs
    • VisiBroker Skeletons
    • Using the VisiBroker TIE Interface
    • JavaIDL Skeletons
  • Creating Callbacks in CORBA
  • Wrapping CORBA Around an Existing Object
    • Mapping to and from CORBA-Defined Types
    • Creating Remote Method Wrappers
    • Implementing Wrapped Callbacks

Chapter 20    Increasing Graphics Performance

  • Double-Buffering to Speed Up Drawing
    • Detecting the Best Drawing Method at Runtime
    • Creating an Autodetecting update Method
  • Performing Selective Updates
  • Redrawing Changed Areas

Chapter 21    Download Strategies

  • Huffman Coding and Lempel-Ziv Compression
  • Delayed Downloading
    • Delayed Instantiation
    • Downloading in the Background
  • Providing Local Libraries
    • Installing Local Libraries for Hotjava and Appletviewer
    • Installing Local Libraries for Netscape
    • Installing Local Libraries for Internet Explorer
  • Downloading Classes in Zipped Format
    • Zip Downloading in Netscape Navigator Version 3
    • A Zipfile Class Loader
  • Packaging Classes in Jars and Cabinets

Chapter 22    Faster Image Downloads

  • Reducing Image Size
  • Image Strips
    • Using the Graphics.clipRect Method
    • Creating Another Graphics Context
  • Storing Only Parts on an Image Strip

Chapter 23    Creating Web Services in Java

  • Using Java Objects Instead of CGI
  • The Servlet API
  • The Web Server as a Computing Server
  • Adding Web Access to Your Java Applications
  • Migrating off the Web Server in the Future

Chapter 24    Writing Web Services for Jeeves

  • What Is Jeeves?
  • The Jeeves HTTP Server
    • Architectural Overview
    • Installing and Running the Jeeves HTTP Server
    • Administering the Jeeves Web Server
    • HTTP Server Security
  • Extending Jeeves' Functionality with Servlets
    • Employing the Servlet API
    • Using the Jeeves Development Toolkit
  • Building a Database Servlet
    • Getting the Information from the Users
    • Connecting Your Servlet to a JDBC Database
    • Inserting Data in the Database
    • Searching the Database
  • Building a Simple Autonomous Agent System with Jeeves
    • Using Object Serialization to Transport Agents Across the Internet
    • Building the Remote Agency
    • Creating a Generic Agent Interface
    • Implementing a Database Search Agent
    • Building the Home Agency
    • Launching the Agent
    • Debriefing the Agent

Chapter 25    Writing Web Services for Jigsaw

  • Architectural Overview
    • Handling the HTTP Protocol with the Daemon Module
    • Managing the Server Information Space with the Resource Module
    • Maintaining Server State via Object Persistence
    • Pre and Post Request Processing with Resource Filters
  • Jigsaw Interface
    • The HTTPResource Class
    • The FilteredResource Class
    • The DirectoryResource Class
    • The FileResource Class
  • Installation and Setup of the Jigsaw HTTP Server
  • Adding Content to the Jigsaw Server
  • Extending the Server with Java
  • Writing Resource Filters in Java
  • Handling Forms and the POST Method in Java

Chapter 26    Securing Applets with Digital Signatures

  • What Are Digital Signatures?
  • Allowing More Access for Signed Applets
  • Using a Third Party for Applet Signatures
  • Potential Security Problems with Digital Signatures
    • Using Phony Signatures
    • Receiving Old Software
    • Mistaken Trust in Signed Applets
    • Running a Phony Web Browser
  • Obtaining a Digital Signature Certificate
  • Other Uses for Digital Signatures

Chapter 27    Encrypting Data

  • Choosing the Right Kind of Encryption
  • Guarding Against Malicious Attacks
    • Resisting a Playback Attack
    • Don't Store Keys in Your Applets
    • Using Public Key Encryption to Exchange Session Keys
    • Using Secure HTTP to Thwart Impersonations
  • Getting Encryption Software
    • Getting SSLava, the Secure Sockets Library
    • Getting the Cryptix Library
    • Getting the Acme Crypto Package

Chapter 28    Accessing Remote Systems Securely

  • Getting a Secure Web Server
  • Preventing Impersonations
  • Accessing Remote Data
  • Passing Keys to Clients
    • Don't Reuse Symmetric Keys
    • Using Public Key Encryption to Get a Private Key
    • Passing a Private Key as an Applet Parameter
  • Implementing a Single-Client Secure Server
  • Implementing a Multiclient Secure Server
  • Creating Other Secure Remote Access Programs

Chapter 29    Creating a Java Shopping Cart

  • Designing a Basic Shopping Cart
  • Creating a Shopping Cart User Interface
    • Creating a Catalog Applet
    • Creating the Shopping Cart Applet

Chapter 30    Performing Secure Transactions

  • Letting Customers Digitally Sign Orders
  • Using Encryption in All Network Communications
  • Creating Java Services for Netscape Servers
    • Creating a Server-Side "Hello World"
    • Installing a New Server-Side Java Applet
    • Handling Forms from Server-Side Applets
    • Sending Files as a Response
    • Returning Multi-Part Responses
    • Maintaining Information Between Applet Invocations
  • Making Server-Side Applets Work on Different Web Servers
  • Performing Secure Transactions

Chapter 31    Java Electronic Commerce Framework (JECF)

  • The Difficulties of Electronic Commerce
    • Theft of Information
    • Fraudulent Programs
    • Proprietary Solutions
    • Static Solutions
    • Platform-Dependence
  • Creating Online Services with the JECF
  • Storing Information in the Wallet Database
    • Keeping Data Safe
    • Performing Transactions
  • Implementing a Shopping Cart Applet with the JECF
  • Offering Services with Cassettes
    • Creating Other Wallet Services
    • Ensuring Cassette Security
    • Dealing with System Failures
  • JECF Availability
  • Getting More Information About the JECF

Chapter 32    Encapsulating Legacy Systems

  • Focusing on Function, not Form
  • Providing Access to New Systems
  • Using CORBA to Open Up a Closed System
  • Encapsulating a TCP/IP System
  • Encapsulating with Native Method Calls
    • Wrapping Java Around a Native Interface
    • Writing Native Methods in C
  • Encapsulating by Emulating a User
  • Getting Assistance from the Legacy System
  • Presenting a Different Interface
  • Combining Multiple Systems
    • Handling Deletions Originating in the Legacy System
    • Using a Two-Phase Commit Protocol
    • Implementing a Two-Phase Commit
  • Some Real-World Examples
    • An Example Legacy System
    • Creating a New Application for the Existing Terminal Base
    • Creating a New Interface for an Existing Application
    • Clearing a Path for Migration off the Legacy System

Chapter 33    Web-Enabling Legacy Systems

  • Using Encapsulations to Access Legacy Data
    • Aiming for Session-Less Transactions
    • Storing Session Information in the Web Page
    • Using HTTP Cookies to Preserve Session Information
    • Choosing a Good Session Identifier
    • Clearing Out Old Sessions
  • Accessing Legacy Data from Servlets

Chapter 34    Interfacing with CICS Systems

  • A Thumbnail Sketch of CICS
  • The CICS External Call Interface
  • The Java-CICS Gateway API
  • Creating Multiple-Call LUWs
  • Creating Web Interfaces to CICS
  • Providing a CORBA Interface to CICS
    • Creating a CORBA-CICS Gateway
    • Creating CORBA Interfaces to CICS Programs

Chapter 35    Adding Additional Protocols to HotJava

  • Writing a Protocol Handler
    • Step One: Decide Upon a Package Name
    • Step Two: Create the Directories
    • Step Three: Set Your CLASSPATH
    • Step Four: Implement the Protocol
    • Step Five: Create the Handler Class
    • Step Six: Compile the Sources
  • Using Protocol Handlers with HotJava
    • Step One: Update the properties File
    • Step Two: Run HotJava
  • Using Protocol Handlers with Your Own Applications
    • The main() Method: Starting FetchWhois
    • The FetchWhois Constructor: Where the Work Gets Done
    • The whoisUSHFactory Class: Registering the Protocol Handler
    • Running FetchWhois
  • More on URLStreamHandlerFactory

Chapter 36    Adding New MIME Types to HotJava

  • Writing Content Handlers
    • Step One: Decide upon a Package Name
    • Step Two: Create the Directories
    • Step Three: Set Your CLASSPATH
    • Step Four: Write the Content Handler
    • Step Five: Compile the Source
  • Using Content Handlers with HotJava
    • Step One: Disable Special MIME Handling
    • Step Two: Update the PROPERTIES File
    • Step Three: Run HotJava
  • Using Content Handlers with Your Own Applications
    • Start FetchFuddify
    • The ContentHandlerFactory Implementation
    • Running the Application

Chapter 37    Creating Multi-User Programs in Java

  • Designing Multi-User Applications
  • Adding Socket-Based Access to Multi-User Applications
    • Creating a Socket-Based Server
    • Sending Messages over Sockets
  • Other Issues When Dealing with Sockets
  • Adding RMI Access to Multi-User Applications

Chapter 38    Creating On-Demand Multimedia Services

  • Java's Suitability for On-Demand Applications
  • Using the On-Demand Audio Applet
    • Logging In
    • Playing Audio Clips
  • Adding Sound to Applets
  • On-Demand Music Applet Code Review
    • Applet Architecture
    • Initialization and Registration
    • Song Selection
    • Playing the Songs
  • Java Shortcomings
  • New Features

Chapter 39    Implementing a Multimedia Encyclopedia

  • Java's Suitability for Multimedia Applications
    • Java Is Portable
    • Java Is Compact
    • Java Can Handle Streaming Data
    • Java Is Based on the Client/Server Model
    • Java Supports PDAs Easily
  • Using the Multimedia Encyclopedia
  • Adding Images and Sound to Applets
  • The On-Line Multimedia Encyclopedia In-Depth
    • Applet Architecture
    • Index Window
    • Topic Window
  • Shortcomings
  • New Features

Chapter 40    Implementing Java Interfaces for Non-Traditional Devices

  • Characteristics of Non-Traditional Devices
  • The New Computing Model
  • Designing Applications to Support Non-Traditional Devices
    • Separating the User Interface from the Application
    • Avoiding Large, Monolithic Applications
    • Sticking to Standard Libraries
    • Avoiding Long, Complex Transactions
  • Designing User Interfaces for Small Devices
    • Creating Obvious, Self-Documenting Interfaces
    • Avoiding Extraneous Pictures or Information
    • Keeping Everything Readable
    • Supporting Multiple Sources of Input
  • Creating Reusable Components for Small Devices
    • Using the CardLayout Layout Manager as a Stack
    • Creating a Keyboard/Keypad Input Filter
    • Creating a Pop-Up Keypad for Pen and Touch-Screen Users

Credits