Links in NIO.2

One of the most important features in the NIO.2 library is the introduction of mechanism to work with links directly from your Java code (this was not possible to do without the use of native code in previous IO libraries). Most of the advanced users are already familiar with concept of hard links and symbolic links. Before we start to talk about links lets review some basic characteristics of both types:

  • Hard link or simply link is a directory entry that links file with name in given file system. Single file can be linked using multiple hard links. Hard link must always have an existing  target and this target can only be a file. User does not lose access to a target file by removing a hard link. Hard link provides linked file even after the target file was removed. Hard links are always bound to a single file system.
  • Symbolic link or soft link is a specific file containing relative or absolute path to a target file. Single file can be linked using multiple symbolic links. Symbolic links do not require an existing target and their target might be file or directory. User does not lose access to a target file by removing a symbolic link. Symbolic link is not influenced by removing of the target file, since its target is not required to exist. These kind of links are called dead links or broken links. Symbolic links are not bound to a single file system.

Continue reading “Links in NIO.2”

SpringSource Certified Spring Professional

When I first heard about this certification I was really excited and wanted to find out what I can about this exam before I start any initiative to pass it. What I found however was the complete lack of resources, guides, information or mock exams of any kind. The only reasonable resource online I was able to find before my exam was a blog post about certification experiences by Jeanne Boyarsky on her well-known blog. However these information are almost 3 years old and few things have changed since then, so please allow me to update you on the current state of the certification process.

Continue reading “SpringSource Certified Spring Professional”

Master your IDE logging with Grep console

One of many daily activities that every programmer needs to do in order to do their work is to control logging output from their application. Logging, when done properly and correctly, provides great insight into the inner workings of the application and may be a great resource for analyzing and optimizing your codes behavior. Whether it is during development or maintenance/support phase of the product life-cycle, this task is often considered to be unpleasant for many programmers. But since log analysis is so important and often required there usually isn’t simple way around. In this article I will present an elegant solution to reviewing logs in development stage of the application within IDE.

Continue reading “Master your IDE logging with Grep console”

Randomly Generated Input Stream

When writing tests, programmers often need to provide some test files for their code to work. This is typically done by uploading them to their version control systems or exposing them over the network to be downloaded at runtime. However the reasons for a particular test file being used may differ greatly. Usually there are these main reasons to include test files in your automated testing process:

  • Configuration
  • Data transfer
  • Test data

Continue reading “Randomly Generated Input Stream”