Java 9 TIFF Image I/O plugins

In earlier version of Java, Image I/O Framework javax.imageio provides a standard way to plug-in image codecs for some formats such as PNG and JPEG. But TIFF is still missing from this set. It was packaged in com.sun.media.imageio.plugins.tiff before. Java 9 TIFF Image I/O plugins has a new package called javax.imageio.plugins.tiff which is renamed from com.sun.media.imageio.plugins.tiff.

In this article, we’re gonna take a look at that package and test a simple example.

[Continue reading…] “Java 9 TIFF Image I/O plugins”

Java 9 CompletableFuture API Improvements – Delay and Timeout Support

To improve Java Future, Java 8 provides CompletableFuture which can execute some code whenever its ready. In this article, we’re gonna take a look at new Java 9 CompletableFuture API that supports delay and timeout.

[Continue reading…] “Java 9 CompletableFuture API Improvements – Delay and Timeout Support”

Java 9 Diamond Operator for Anonymous Inner Classes

Java 7 has a new feature called Diamond Operator which helps to make code more readable, but it is still limited with Anonymous Inner Classes. In this article, JavaSampleApproach will introduce Java 9 Diamond Operator that can simplifies code and improves readability.

[Continue reading…] “Java 9 Diamond Operator for Anonymous Inner Classes”

Java 9 try-with-resources Improvement

Java 7 introduces a new approach for closing resources by try-with-resources statement. After that, Java 9 try-with-resources makes an improved way of writing code. Now we can simplify our code and keep it cleaner and clearer.

Related post: Java 7 – try-with-resources Statement

[Continue reading…] “Java 9 try-with-resources Improvement”

Chain of Responsibility Pattern in Java

Chain of Responsibility Pattern is a Behavioral Pattern in which, a Request is sent through a chain of handling Objects without knowing which Object will handle it. With Chain of Responsibility Pattern, we can avoid coupling the Sender of a request to received Objects and create a processing sequence automatically based on type of request.

[Continue reading…] “Chain of Responsibility Pattern in Java”

Facade Pattern in Java

Facade Pattern is a Structural Pattern in which, a set of interfaces is gathered into only one interface that Client can work easily and simply. Facade Pattern helps us to wrap complexities of components inside and lose coupling between Client and subSystems.

[Continue reading…] “Facade Pattern in Java”

Java 9 Stream Improvements

Java 9 Stream comes with some small useful improvements. In this tutorial, we’re gonna look at new added methods: iterate(), takeWhile()/dropWhile(), ofNullable().

Related Articles:
Lambda Expressions
Java 8 Streams

[Continue reading…] “Java 9 Stream Improvements”

How to use Spring Factory Method to create Spring Bean

Spring Framework provides Spring Factory Method mechanics to create Beans from static(non-static) method of a Factory Class in XML config files. In the tutorial, JavaSampleApproach will introduce Spring Factory Method with sample codes.

Related Posts:
How to inject Collection in Spring
Inject Properties from Properties File using Spring Environment

[Continue reading…] “How to use Spring Factory Method to create Spring Bean”