Home » Core Java » apache » Page 2

apache

Lucene Analyzer Example

In this example, we are going to learn about Lucene Analyzer class. Here, we will go through the simple and fundamental concepts with the Analyzer Class. Previously, we have already gone through some of basic and implementation concepts with StandardAnalyzer Class with our indexing example. Here, we will go through the usage and description of main Analyzer Class provided in Lucene. ...

Read More »

JUnit Ant Example

1. Introduction In this tutorial, I’ll be showing an example of how to run your test units in Apache Ant. It is entirely possible that one of the applications you might encounter in your experience as a developer to use Apache Ant. After all, it was the defacto standard for building Java/Java EE apps before so the possibility of you ...

Read More »

Lucene Indexing Example

In this Example , we are going to learn about Lucene Indexing. We went through three of the important classes to go with for the Indexing process in the previous three examples. Here, we go through the fundamental concepts behind the whole Indexing process.Thus, this post aims to demonstrate you with Indexing Approach in Lucence as well as options and features ...

Read More »

Lucene Standardanalyzer Example

In this Example, we are going to learn specifically about Lucene Standardanalyzer class. Here, we go through the simple and fundamental concepts with the Standardanalyzer Class. We went through different searching options and features that lucence facilitates through use the QueryParser class in my earlier post. This post aims to demonstrate you with implementation contexts for the Standard Analyzer. The code ...

Read More »

Lucene Query Parser Example

In this Example , we are going to learn about Lucene QueryParser class. Here, we go through the simple and fundamental concepts with the QueryParser Class. In my previous post, we went through the indexing, writing, searching and displaying steps for the indexing example. Here we go through the searching step i.e. more specifically the concepts with the QueryParser Class. Thus, this ...

Read More »

Lucene indexwriter example

In this Example , we are going to learn about Lucene indexwriter class. Here, we go through the simple and fundamental use with the IndexWriter Class. This simple demonstration goes through the indexing, writing, searching and displaying steps for the indexing example.Thus, this post aims to demonstrate you with a simple demonstration for use of IndexWriter class from lucene. The ...

Read More »

org.apache.commons.dbcp2.PoolingConnection Example

In this example, we shall show you how to use PoolingConnection of Apache commons dbcp2 library. DBCP is a part of Apache common components and intended for database connection pooling. PoolingConnection is a delegating connection that pools java.sql.PreparedStatement. The prepared statement will be either created or returned from the pool by PoolingConnection as shown in example below. Clients of this class needs ...

Read More »

org.apache.commons.codec.binary.Base64OutputStream Example

Base64OutputStream has constructors with parameter for encoding (default behavior) and decoding in a streaming fashion for unlimited size. The default line length is 76 characters for encoding. The default lineEnding is CRLF. Base64InputStream has default behavior for decoding. There are other constructors for Base64OutputStream and Base64InputStream has different constructors to override default behavior. Base64OutputStream takes byte streams instead of character ...

Read More »

org.apache.commons.dbcp.BasicDataSource Example

In this example, we shall show you how to use BasicDataSource of Apache commons dbcp library. DBCP is a part of apache common components and intended for database connection pooling. BasicDataSource is a basic implementation of javax.sql.DataSource Using BasicDataSource, one can easily connect to a Relational Database as we will show in following example. For this example, we will be using ...

Read More »

org.apache.commons.logging.logfactory Example

In this example, we shall be talking about how we can use the Apache commons org.apache.commons.logging.Logfactory class. You can download the apache commons logging Jar file from here. The Logfactory class uses the Factory Design Pattern to select a logger class. The Apache Commons Logging library decouples the code from the underlying logging library we use.     The Logger ...

Read More »