com.thaiopensource.relaxng.translate.util.EncodingParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trang Show documentation
Show all versions of trang Show documentation
Trang, a multi-format schema converter based on RELAX NG.
package com.thaiopensource.relaxng.translate.util;
import com.thaiopensource.xml.util.EncodingMap;
import java.io.UnsupportedEncodingException;
public abstract class EncodingParam extends AbstractParam {
public void set(String value) throws InvalidParamValueException {
try {
"x".getBytes(EncodingMap.getJavaName(value));
}
catch (UnsupportedEncodingException e) {
throw new ParamProcessor.LocalizedInvalidValueException("unsupported_encoding");
}
setEncoding(value);
}
protected abstract void setEncoding(String encoding) throws InvalidParamValueException;
}