Problem: How to use Java Base64 to encode data using URL and Filename safe Base64 Alphabet? In the following example we’ll show how to use Base64 util class, available since Java 8.
Continue reading Java Base64 URLjava
Problem: How to encode and decode Base64 MIME message in Java? In the following example we’ll show how to use Base64 util class available in Java 8 to do the work.
Continue reading Java Base64 MIMEProblem: How to encode and decode a message in Java using Base64 encoding? Since Java 8 there is Base64 class for encoding and decoding bytes. Here we show how to use it.
Continue reading Java Base64Problem: How to load Properties in Java? Properties class has methods to load properties from different sources – InputStream, Reader, and XML file. Here’s an example of Properties.loadFromXML(InputStream).
Continue reading Java Properties load from XMLProblem: How to load Properties in Java? Properties class has methods to load properties from different sources – InputStream, Reader, and XML file. Here’s an example of Properties.load(InputStream).
Continue reading Java Properties loadProblem: How to store Java Properties as XML? It turns out that it’s not only possible, but also easy with the Properties class as you can see in the example in this post.
Continue reading Java Properties store as XMLProblem: How to store Java Properties? Properties class has methods to store/save to different outputs – OutputStream, Writer or even XML file. Here’s an example of Properties.store(OutputStream).
Continue reading Java Properties storeProblem: How to list Java Properties? Properties can be written to PrintWriter or PrintStream as we demonstrate in the example below.
Continue reading Java list PropertiesProblem: How to read Java System Properties? In the following example we show how to read single System property, list all, and use default when property is not defined.
Continue reading Java System propertiesProblem: How to do null check in Java? The old way was to do validation manually, but since Java 7 there’s a better way. In the following example we show the difference.
Continue reading Java null check