All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hisrc.jsonix.xml.sax.LocatorUtils Maven / Gradle / Ivy

There is a newer version: 2.3.9
Show newest version
package org.hisrc.jsonix.xml.sax;

import org.xml.sax.Locator;

public class LocatorUtils {

	private LocatorUtils() {
	}

	public static String toString(Locator locator) {
		if (locator == null) {
			return null;
		} else {
			final StringBuilder sb = new StringBuilder();
			final String publicId = locator.getPublicId();
			if (publicId != null) {
				sb.append(publicId).append(':');
			}
			final String systemId = locator.getSystemId();
			if (systemId != null) {
				sb.append(systemId).append(':');
			}
			sb.append(locator.getLineNumber()).append(':');
			sb.append(locator.getColumnNumber());
			return sb.toString();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy