December 28, 2006

Read the Entries from a JAR/ZIP Archives with the URL Class

This tip shows you how to display the entries from a JAR/ZIP archive using the class. The key in this example is the URL construction. import*;import*;import java.awt.*;import java.util.*;import java.util.jar.*;class read extends Frame{ URL url=null; JarURLConnection URLcon=null; JarFile jar=null; TextArea TA=new TextArea(15,35); public read(String titlu) { super(titlu); }

Add, Remove, or Edit Saved Passwords

The ability of Windows XP to save passwords for Web sites and network resources can be very convenient. Of course, it’s true that anyone with access to your computer can log into stored-credentials sites, but only if they can log onto your computer as you?so the risk is minimal for

Use Nullable Types to Assign a Null Value to Value-type Variables

Suppose you want to have a primitive type with a null (or an unknown) value. This is where you would use a nullable type. Nullable types have the following characteristics: They represent value-type variables that can be assigned the value of null. You cannot create a nullable type based on

Clear All Occurences of Extra White Space

This function clears all occurences of extra white space (spaces, tabs, blank lines) and programming comments beginning with ‘;’ in a file and saves the cleaned file as another file. It uses the following I/P arguments: The inbuilt Ltrim and Rtrim functions can remove spaces only on the sides but