Random numbers in java can be generated either by using the Random class in java.util package or by using the random() method in the Math class in java.lang package. In both these approaches, we only get a pseudo random number and not a true random number because it is all generated based on some mathematical [...]
Archive | October, 2007
Downloading Content from the Internet
October 9, 2007
Let us write a Simple Downloader in this techincal tip by making use of the classes with java.net package. URL stands for Uniform Resource Locator and it is used to locate a resource in the Web in a standard fashion. A resource in the Web can be anything; it can be as simple as Html [...]
Creating user defined exceptions
October 9, 2007
Though Java provides an extensive set of in-built exceptions, there are cases in which we may need to define our own exceptions in order to handle the various application specific errors that we might encounter. While defining an user defined exception, we need to take care of the following aspects: The user defined exception class [...]
Copying File Contents using FileChannel
October 9, 2007
In this technical tip, let us see an easy way of achieving file copy using File Channels. File Channels are part of Java New I/O Packages. A file can be viewed as a sequence of bytes. The various Buffer classes in New I/O Packages serve as a container for manipulating the primitive byte contents. It [...]
What is Hibernate Caching?
October 2, 2007
1) Introduction While working with Hibernate web applications we will face so many problems in its performance due to database traffic. That to when the database traffic is very heavy . Actually hibernate is well used just because of its high performance only. So some techniques are necessary to maintain its performance. Hibernate Caching is [...]






October 9, 2007
1 Comment