Home » Author Archives: Dustin Marx

Author Archives: Dustin Marx

Displaying Paths in Ant

apache-ant-logo

In the blog posts Java and Ant Properties Refresher and Ant <echoproperties /> Task, I wrote about how being able to see how properties are seen by an Ant build can be helpful in understanding that build better. It is often the case that it’d also be valuable to see various paths used in the build as the build sees ...

Read More »

Validating XML Against XSD(s) in Java

java-logo

There are numerous tools available for validating an XML document against an XSD. These include operating system scripts and tools such as xmllint, XML editors and IDEs, and even online validators. I have found it useful to have my own easy-to-use XML validation tool because of limitations or issues of the previously mentioned approaches. Java makes it easy to write ...

Read More »

The End of Google Code

github-logo

In the 21 January 2014 post Google Code is dead, Evert Pot referenced the post A Change to Google Code Download Service and wrote that “It’s been sort of obvious for a while that [ Google ] stopped caring about their code hosting.” The title of Pot’s post was borne out with the announcement this past week that Google is ...

Read More »

Excellent! Groovy Intends to Join Apache Software Foundation

groovy-logo

In the post “Total Bummer: Pivotal Drops Groovy“, I briefly wrote about Pivotal’s decision to drop Groovy and hoped that Groovy would find a new home. I was pleased to read the announcement that the Groovy project intends to join the Apache Software Foundation. My experience is that some of the best maintained, best supported, and best documented open source ...

Read More »

JDK 8 Streams and Grouping

java-logo

I wrote about the powerful features of using JDK 8‘s Streams with Java collections in the post Stream-Powered Collections Functionality in JDK 8. I did not cover use of the groupingBy Collector reduction operation in that post and so address grouping in this post. The examples in this post will demonstrate how to combine Collection-backed Streams with groupingBy Collectors to ...

Read More »

Joining Strings in JDK 8

java-logo

JDK 8 introduced language features such as lambda expressions, streams, and even the new Date/Time API that will change the way we write Java applications. However, there are also several new APIs and features that might be less “game changing,” but still bring greater convenience and expressiveness to the Java programming language. In this post, I look at one of ...

Read More »

Determining File Types in Java

java-logo

Programmatically determining the type of a file can be surprisingly tricky and there have been many content-based file identification approaches proposed and implemented. There are several implementations available in Java for detecting file types and most of them are largely or solely based on files’ extensions. This post looks at some of the most commonly available implementations of file type ...

Read More »

Writing Groovy’s groovy.util.slurpersupport.GPathResult (XmlSlurper) Content as XML

groovy-logo

In a previous blog post, I described using XmlNodePrinter to present XML parsed with XmlParser in a nice format to standard output, as a Java String, and in a new file. Because XmlNodePrinter works with groovy.util.Node instances, it works well with XmlParser, but doesn’t work so well with XmlSlurper because XmlSlurper deals with instances of groovy.util.slurpersupport.GPathResult rather than instances of ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close