@Override
        public Document call() throws Exception {
            if (stream != null) {
                return localSAXReader.get().read(stream);
            } else if (reader != null) {
                return localSAXReader.get().read(reader);
            } else if (file != null) {
                return localSAXReader.get().read(file);
            } else {
                // Did you forget to add an 'else' block for the new type that you added?
                throw new IllegalStateException("Unable to parse data. Data is either null, or of an unrecognized type.");
            }
        }
Constructs a new SAXReader instance, configured for XMPP parsing.

@return A new SAXReader instance.
xmppserver/src/main/java/org/jivesoftware/util/SAXReaderUtil.java