Woodstox 6.4.0 - Source Code Files

Woodstox 6.4.0 Source Code Files are provided at the Woodstox GitHub Website.

You can download them from the "src/main/java" folder.

You can also browse Woodstox Source Code files below:

✍: FYIcenter

com/ctc/wstx/io/SystemId.java

package com.ctc.wstx.io;

import java.io.IOException;
import java.net.URL;

import com.ctc.wstx.util.URLUtil;

/**
 * Helper class that is used to defer construction of {@link URL}
 * to help with cases where real URL is not actually needed, and
 * incoming System Id may not even resolve properly.
 *<p>
 * Note that class is meant to be accessed from a single thread, and
 * is not designed as multi-thread safe. Specifically it is not to be
 * used for caching or as a key, but strictly as System Id for processing
 * of a single XML document.
 * 
 * @since 4.4
 */
public class SystemId
{
    protected URL mURL;

    protected String mSystemId;

    protected SystemId(String systemId, URL url) {
        if (systemId == null && url == null) {
            throw new IllegalArgumentException("Can not pass null for both systemId and url");
        }
        mSystemId = systemId;
        mURL = url;
    }
	
    public static SystemId construct(String systemId) {
        return (systemId == null) ? null : new SystemId(systemId, null);
    }

    public static SystemId construct(URL url) {
        return (url == null) ? null : new SystemId(null, url);
    }

    public static SystemId construct(String systemId, URL url) {
        if (systemId == null && url == null) {
            return null;
        }
        return new SystemId(systemId, url);
    }

    public URL asURL() throws IOException {
        if (mURL == null) {
            mURL = URLUtil.urlFromSystemId(mSystemId);
        }
        return mURL;
    }

    public boolean hasResolvedURL() {
        return (mURL != null);
    }
	
    @Override
    public String toString() {
	    if (mSystemId == null) {
	        mSystemId = mURL.toExternalForm();
	    }
	    return mSystemId;
    }
}

com/ctc/wstx/io/SystemId.java

 

Or download all of them as a single archive file:

File name: woodstox-core-6.4.0-fyi.zip
File size: 552992 bytes
Release date: 2022-10-25
Download 

 

 

woodstox-core-6.4.0.jar - Woodstox Core 6.4.0

What Is Woodstox XML Processing

Download and Review Woodstox wstx-*.jar

⇑⇑ Woodstox for XML Processing

2023-01-29, 3329👍, 0💬