devxlogo

Tip Bank

Java Code to Filter File Names in a Directory

The following Java code does the following: Filters files for an array of extensions. Splits file names. Tests the resulting array package FileHandling;import java.io.File;import java.io.FilenameFilter;/** * filters files for an

Managed Classes and Object Injection in Java EE 5

This table provides a quick reference for what types of managed classes can inject what object in Java EE 5.   Objects Managed Classes Stateful Stateless Message-driven Bean (MDB) Interceptors

Managing Concurrent Requests with EJB Containers

As you probably know, an important solution offered by EJB containers is the ability to manage concurrent requests and satisfy multiple clients while avoiding unpleasant issues. When the number of

Using EJB Interceptors for Java EE Audits

Enterprise JavaBeans (EJB) 3.0 provided the ability to intercept EJB business methods by using AroundInvoke interceptors. Based on these interceptors, you can access the method name, its parameters, and its

Merge XML files into a PDF Document in .NET

Sometimes different PDF documents have some content in common. For example, a number of PDF documents may have the same header or footer. In such cases, .NET developers who are

Java Tip: Optimization Technique for Lists

The default size for a Java ArrayList class is 10. When an ArrayList reaches its capacity maximum (10), it increases its capacity by approximately half. That is why an ArrayList

Programmatically Upload a File to FTP Server in .Net

The following code snippet could be used to upload files to an FTP site. It uses the ‘FtpWebRequest’ and ‘FtpWebResponse’ classes from the System.Net namespace.Using System.Net: //Also include any other