Category : How To

Locking a file is quite simple in Java. The FileChannel (Java Doc) provides all methods we need to lock files. The tryLock() (Java Doc) method will try to obtain the lock on the file without waiting. If the lock is acquired an instance of FileLock (Java Doc) is returned, otherwise this method returns null.

Albert Attard
Author: 3 years ago

Selenium () is a comprehensive testing framework for web applications which allows us to take screenshots of web pages programmatically amongst many other things. It makes use of web browsers, such as FireFox (), to open the web page and then takes the screenshot. This guarantees a genuine representation of the web page.

Albert Attard
Author: 3 years ago

Cryptographic Hash algorithms (Wiki), such as SHA-1 (Wiki), are known for digesting inputs of any size into a fixed length, nondeterministic, output. Irrespective of the input size, the output is always of a fixed length, 160 bits (or 20 bytes) in case of SHA-1. Different hash algorithms produce different lengths. When processing large inputs, such as large files, it is convenient to work with streams, rather than loading all input to memory first.

Albert Attard
Author: 3 years ago

This tutorial demonstrates how to develop a Java application that connects with a database and provides a user interface and is targeted to students who studied Java, but lack experience. This tutorial assumes basic knowledge of Java and it describes everything in great detail. The main idea of this tutorial is not learn Java, but to help the viewers to gain experience in developing Java applications. During the tutorial we explore various technologies, such as Maven (Homepage). These technologies are quite popular amongst developers communities and are considered as good traits when applying for jobs.

Albert Attard
Author: 4 years ago