-
Recent Posts
- Follow softwarecave on WordPress.com
Archives
- December 2021 (1)
- October 2021 (2)
- April 2018 (1)
- March 2018 (3)
- February 2018 (1)
- February 2017 (4)
- December 2014 (3)
- November 2014 (2)
- August 2014 (1)
- July 2014 (2)
- June 2014 (2)
- May 2014 (2)
- April 2014 (5)
- March 2014 (9)
- February 2014 (11)
- January 2014 (6)
- September 2011 (1)
Categories
Monthly Archives: February 2014
Recursively walking directory using Java NIO
Sometimes you may need to recursively visit all files and subdirectories of given directory and perform some actions on it. The typical use case is searching files of a given type, copying or removing a directory including all its contents. … Continue reading
Calculating cryptographic hash functions in Java
Cryptographic hash function is an algorithm which takes block of data of arbitrary length as an input and outputs a short fixed-length sequence of bits (usually 128-512 bits) and which ideally should have following properties: it is very easy to … Continue reading
Posted in cryptography, Java
Tagged cryptographic hash, cryptography, hash function, Java, security
Leave a comment
Git: how to ignore files
When working with Git you will quickly come across several files which are present in the working copy for various reasons but which should not be tracked by Git. The typical examples are logs, compiled binaries or IDE configuration files. … Continue reading
Git: how to use stash
Sometimes I have a situation that I am working on some feature on my own branch and suddenly someone comes to me and says that something really important has to be fixed or improved on the main branch. Usually it … Continue reading
How to parse XML documents using Streaming API for XML (StAX)
Streaming API for XML provides interface XMLStreamReader which gives a low-level but very efficient cursor-like API for reading XML documents. When using it we iterate over various events in XML document and extract information about these events. Once we are … Continue reading
Why I prefer Java over C++
C++ is a language I used for almost 2 years at work, for all my university projects except when there was an explicit requirement to use a different programming language and at home for very different tasks. The language alone … Continue reading
How to write XML documents using Streaming API for XML (StAX)
Nowadays XML became a de-facto standard for storing and exchanging documents over Internet. And because it was designed to be extensible, it can be easily adapted to almost every need. In this post I would like to describe how to … Continue reading
Definition of Done: or why it is very risky to say that something is done
General meaning of word done may seem obvious to everybody but once you start thinking about this, it becomes clear that done may have different meanings depending on the situation and personal point of view. In this article I would … Continue reading
JSF Facelets: templates
Facelets were introduced in JSF 2.0 to resolve common inefficiencies in JSF when creating large-scale sites. Two most useful additions provided by facelets were the ability to reuse the code through templating and to create custom composite components conveniently. In … Continue reading
Create temporary files and directories using Java NIO2
Temporary files and directories are very useful in many situations. One typical case is that you are writing some (usually large) file and you don’t want anybody to accidentally access and mess with it until is completely written and closed. … Continue reading