ITEXT PDF / NOTES</>↗iText PDF04 Dec 2011
The com.itextpdf.text.Phrase represent a phrase of text in the Document object. The Phrase object knows how to add spacing between lines of text. So if we add some phrase into the document it will start on a new line when it reaches the right edge of the document. The default leading / line spacing of […]
ITEXT PDF / NOTES</>↗iText PDF04 Dec 2011
A chunk com.itextpdf.text.Chunk is the smallest significant part that can be added to a document. A chunk is a string with Font information. A chunk doesn’t add line breaks, a paragraph spacing or any other spacing. The layout parameters of a chunk should be defined in the object to which this chunk is added. When […]
ITEXT PDF / NOTES</>↗iText PDF04 Dec 2011
The com.itextpdf.text.Document is the core class of the iText library. This class represents a pdf document. Basically to work with a document we must first create an instance of a Document. After the instance created we open the document by calling the open() method. To add some content into the document we can use the […]
CORE API / NOTES</>↗Core API24 Aug 2011
You can use ThreadGroup.isDestroyed() method to check whether a thread group and its subgroups has been destroyed. package org.kodejava.lang; public class CheckGroupDestroy { public static void main(String[] args) { ThreadGroup grandParent = new ThreadGroup("GrandParent"); ThreadGroup uncle = new ThreadGroup(grandParent, "Uncle"); ThreadGroup parent = new ThreadGroup(grandParent, "Parent"); ThreadGroup son = new ThreadGroup(parent, "Son"); ThreadGroup daughter = […]
CORE API / NOTES</>↗Core API24 Aug 2011
You can destroy a thread group by using destroy() method of ThreadGroup class. It will cleans up the thread group and removes it from the thread group hierarchy. It’s not only destroy the thread group, but also all its subgroups. The destroy() method is of limited use: it can only be called if there are […]
JDBC / NOTES</>↗JDBC22 Aug 2011
One thing that we need to do manually when programming using JDBC is to make sure to close all the resources that we use. All resources including the ResultSet, Statement and Connection must be closed. This will usually produce a lot of boilerplate code in our program. Starting from JDBC 4.1, which is a part […]