com.sun.org.apache.xerces.internal.util.EncodingMap Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.util.EncodingMap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EncodingInfo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #2
Source File: EncodingInfo.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #3
Source File: EncodingInfo.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #4
Source File: EncodingInfo.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #5
Source File: EncodingInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #6
Source File: EncodingInfo.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #7
Source File: EncodingInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #8
Source File: EncodingInfo.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #9
Source File: EncodingInfo.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #10
Source File: EncodingInfo.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #11
Source File: EncodingInfo.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a writer for this encoding based on
 * an output stream.
 *
 * @return A suitable writer
 * @exception UnsupportedEncodingException There is no convertor
 *  to support this encoding
 */
public Writer getWriter(OutputStream output)
    throws UnsupportedEncodingException {
    // this should always be true!
    if (javaName != null)
        return new OutputStreamWriter(output, javaName);
    javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    if(javaName == null)
        // use UTF-8 as preferred encoding
        return new OutputStreamWriter(output, "UTF8");
    return new OutputStreamWriter(output, javaName);
}
 
Example #12
Source File: EncodingInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #13
Source File: EncodingInfo.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #14
Source File: EncodingInfo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #15
Source File: EncodingInfo.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #16
Source File: EncodingInfo.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #17
Source File: EncodingInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #18
Source File: EncodingInfo.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #19
Source File: EncodingInfo.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #20
Source File: EncodingInfo.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #21
Source File: EncodingInfo.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}
 
Example #22
Source File: EncodingInfo.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates new <code>EncodingInfo</code> instance.
 */
public EncodingInfo(String ianaName, String javaName, int lastPrintable) {
    this.ianaName = ianaName;
    this.javaName = EncodingMap.getIANA2JavaMapping(ianaName);
    this.lastPrintable = lastPrintable;
}