Java Tutorial Blog
Java Papers is a Java blog and tutorial website. Java Papers is passionately published by Joe for eight successful years. It has served millions of views and is one of the most popular Java blog in the Java community. Articles and tutorial published are of Java, Android, design patterns, web services, Spring framework, Servlets and JSP technologies. Java Papers helps to refresh your Java knowledge, keep updated with latest news, prepare for Java interviews and certifications. Welcome!
In this Java tutorial, we will see about how to read and write files using NIO channels. Channels are used for data transfer between a buffer and an entity. There are different channels like ByteChannel, FileChannel, SocketChannel and DatagramChannel. In this tutorial we will learn about using ByteChannel and FileChannel to perform file IO operations. […]
Published to Java Tutorial on 13/09/2015.
In this Java article I walk you through designing a micro benchmark to assess the performance between String + (plus operator), String.concat method, StringBuilder.append method and StringBuffer.method. These are all different ways using which we can append two string values. This is a well grinded topic over the period and everybody knows the result of […]
Published to Java Tutorial on 03/09/2015.
PropertySource is an abstract base class that represents a source of name value property pairs. @PropertySource is an annotation for declaring a PropertySource to Spring’s Environment. In this Spring tutorial, we are going to discuss the following three topics in detail with examples, Spring 3.1 @PropertySource Annotation @PropertySource Annotation improvements in Spring 4 Java 8 […]
Published to Spring Tutorial on 30/08/2015.
Buffer is a block of data that is to be written to a channel or just read from a channel. It is an object that holds data and acts as an endpoint in a NIO channel. Buffer provides a formal mechanism to access data and tracks the read and write processes. Buffer is one of […]
Published to Java Tutorial on 20/08/2015.
In Java NIO, channels are used for I/O transfers. Channel is a like a tube that transports data between a buffer and an entity at other end. A channel reads data from an entity and places it in buffer blocks for consumption. Similarly, we should write to buffer blocks and that data will be transported […]
Published to Java Tutorial on 20/08/2015.
This Spring tutorial is to learn about @Conditional annotation that was introduced in Spring 4.0 We shall see about what @Conditional annotation is, in what scenarios it can be used, difference between @Conditional vs @Profile annotations and an example Spring application using @Conditional annotation. Prerequisites Introduction to @Conditional Difference between @Conditional and @Profile annotations Spring […]
Published to Spring Tutorial on 11/08/2015.
This Java tutorial is to learn about what is a micro benchmark and how to do a micro benchmark using JMH. Java Microbenchmark Harness (JMH) is a Java tool by OpenJDK for creating benchmarks. We can use JMH to benchmark programs written in Java and other languages that targets the Java JVM. Benchmark is a […]
Published to Java Tutorial on 26/07/2015.
In this Java NIO tutorial let us learn about putting FileVisitor and glob pattern matching into practical use. In the present Java NIO tutorial series we learnt about what is glob and how to use it. Then we saw about how to walk a file tree using NIO FileVisitor. Now let us combine these two […]
Published to Java Tutorial on 23/07/2015.
This Java NIO tutorial is to learn about walking a file tree. In a file handling application walking a file tree will be a regular requirement. Java NIO has given FileVisitor interface using which we can walk through a file tree. This tutorial is part of the Java NIO tutorial series. Walk with NIO FileVisitor […]
Published to Java Tutorial on 22/07/2015.
This Java NIO tutorial is to learn about how to access file attributes and if possible modify it. java.nio.file.attribute package contains classes that helps to get and set file attributes. Before Java SE 7 we did not have direct support to access the large array file attributes. Now the NIO API is advanced, it has […]
Published to Java Tutorial on 21/07/2015.