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

com.thaiopensource.relaxng.translate.util.EncodingParam Maven / Gradle / Ivy

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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy