/** * Returns the last modified date of the given {@link Source}. * * @param source the source * @return the last modified date, as a long */ static long getLastModified(Source source) { if (source instanceof DOMSource) { Document document = TraxUtils.getDocument((DOMSource) source); return document != null ? getLastModified(document.getDocumentURI()) : -1; } else { return getLastModified(source.getSystemId()); } }
/** * Returns the last modified date of the given {@link Source}. * * @param source the source * @return the last modified date, as a long */ static long getLastModified(Source source) { if (source instanceof DOMSource) { Document document = TraxUtils.getDocument((DOMSource) source); return document != null ? getLastModified(document.getDocumentURI()) : -1; } else { return getLastModified(source.getSystemId()); } }
/** * Returns the last modified date of the given {@link Source}. * * @param source the source * @return the last modified date, as a long */ static long getLastModified(Source source) { if (source instanceof DOMSource) { Document document = TraxUtils.getDocument((DOMSource) source); return document != null ? getLastModified(document.getDocumentURI()) : -1; } else { return getLastModified(source.getSystemId()); } }
/** * Returns the last modified date of the given {@link Source}. * * @param source the source * @return the last modified date, as a long */ static long getLastModified(Source source) { if (source instanceof DOMSource) { Document document = TraxUtils.getDocument((DOMSource) source); return document != null ? getLastModified(document.getDocumentURI()) : -1; } else { return getLastModified(source.getSystemId()); } }