Java Code Geeks » Dustin Marx http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Thu, 26 Mar 2015 20:00:08 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.1 Displaying Paths in Anthttp://www.javacodegeeks.com/2015/03/displaying-paths-in-ant.html http://www.javacodegeeks.com/2015/03/displaying-paths-in-ant.html#comments Mon, 23 Mar 2015 20:00:42 +0000 http://www.javacodegeeks.com/?p=38471 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 ...

 

]]>
http://www.javacodegeeks.com/2015/03/displaying-paths-in-ant.html/feed/ 0
Validating XML Against XSD(s) in Javahttp://www.javacodegeeks.com/2015/03/validating-xml-against-xsds-in-java.html http://www.javacodegeeks.com/2015/03/validating-xml-against-xsds-in-java.html#comments Fri, 20 Mar 2015 08:00:05 +0000 http://www.javacodegeeks.com/?p=38401 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 ...

 

]]>
http://www.javacodegeeks.com/2015/03/validating-xml-against-xsds-in-java.html/feed/ 0
The End of Google Codehttp://www.javacodegeeks.com/2015/03/the-end-of-google-code.html http://www.javacodegeeks.com/2015/03/the-end-of-google-code.html#comments Thu, 19 Mar 2015 14:00:34 +0000 http://www.javacodegeeks.com/?p=38316 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 ...

 

]]>
http://www.javacodegeeks.com/2015/03/the-end-of-google-code.html/feed/ 0
Excellent! Groovy Intends to Join Apache Software Foundationhttp://www.javacodegeeks.com/2015/03/excellent-groovy-intends-to-join-apache-software-foundation.html http://www.javacodegeeks.com/2015/03/excellent-groovy-intends-to-join-apache-software-foundation.html#comments Tue, 17 Mar 2015 11:00:58 +0000 http://www.javacodegeeks.com/?p=38146 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, ...

 

]]>
http://www.javacodegeeks.com/2015/03/excellent-groovy-intends-to-join-apache-software-foundation.html/feed/ 0
JDK 8 Streams and Groupinghttp://www.javacodegeeks.com/2015/03/jdk-8-streams-and-grouping.html http://www.javacodegeeks.com/2015/03/jdk-8-streams-and-grouping.html#comments Thu, 12 Mar 2015 08:00:05 +0000 http://www.javacodegeeks.com/?p=37948 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 ...

 

]]>
http://www.javacodegeeks.com/2015/03/jdk-8-streams-and-grouping.html/feed/ 0
Joining Strings in JDK 8http://www.javacodegeeks.com/2015/02/joining-strings-in-jdk-8.html http://www.javacodegeeks.com/2015/02/joining-strings-in-jdk-8.html#comments Fri, 27 Feb 2015 11:00:11 +0000 http://www.javacodegeeks.com/?p=37462 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, ...

 

]]>
http://www.javacodegeeks.com/2015/02/joining-strings-in-jdk-8.html/feed/ 1
Determining File Types in Javahttp://www.javacodegeeks.com/2015/02/determining-file-types-java.html http://www.javacodegeeks.com/2015/02/determining-file-types-java.html#comments Mon, 23 Feb 2015 14:00:45 +0000 http://www.javacodegeeks.com/?p=37368 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 ...

 

]]>
http://www.javacodegeeks.com/2015/02/determining-file-types-java.html/feed/ 0
Using JDK 8 Streams to Convert Between Collections of Wrapped Objects and Collections of Wrapper Objectshttp://www.javacodegeeks.com/2015/02/using-jdk-8-streams-convert-collections-wrapped-objects-collections-wrapper-objects.html http://www.javacodegeeks.com/2015/02/using-jdk-8-streams-convert-collections-wrapped-objects-collections-wrapper-objects.html#comments Mon, 23 Feb 2015 11:00:22 +0000 http://www.javacodegeeks.com/?p=37342 I have found Decorators and Adapters to be useful from time to time as I have worked with Java-based applications. These “wrappers” work well in a variety of situations and are fairly easy to understand and implement, but things can become a bit more tricky when a hierarchy of objects rather than a single object ...

 

]]>
http://www.javacodegeeks.com/2015/02/using-jdk-8-streams-convert-collections-wrapped-objects-collections-wrapper-objects.html/feed/ 1
A JAXB Nuance: String Versus Enum from Enumerated Restricted XSD Stringhttp://www.javacodegeeks.com/2015/02/jaxb-nuance-string-versus-enum-enumerated-restricted-xsd-string.html http://www.javacodegeeks.com/2015/02/jaxb-nuance-string-versus-enum-enumerated-restricted-xsd-string.html#comments Fri, 20 Feb 2015 17:00:23 +0000 http://www.javacodegeeks.com/?p=37121 Although Java Architecture for XML Binding (JAXB) is fairly easy to use in nominal cases (especially since Java SE 6), it also presents numerous nuances. Some of the common nuances are due to the inability to exactly match (bind) XML Schema Definition (XSD) types to Java types. This post looks at one specific example of ...

 

]]>
http://www.javacodegeeks.com/2015/02/jaxb-nuance-string-versus-enum-enumerated-restricted-xsd-string.html/feed/ 0
Writing Groovy’s groovy.util.slurpersupport.GPathResult (XmlSlurper) Content as XMLhttp://www.javacodegeeks.com/2015/02/writing-groovys-groovy-util-slurpersupport-gpathresult-xmlslurper-content-xml.html http://www.javacodegeeks.com/2015/02/writing-groovys-groovy-util-slurpersupport-gpathresult-xmlslurper-content-xml.html#comments Thu, 19 Feb 2015 23:00:43 +0000 http://www.javacodegeeks.com/?p=37116 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 ...

 

]]>
http://www.javacodegeeks.com/2015/02/writing-groovys-groovy-util-slurpersupport-gpathresult-xmlslurper-content-xml.html/feed/ 0