Java 类org.apache.catalina.util.CharsetMapper 实例源码

项目:tomcat7    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
@Override
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class<?> clazz = Class.forName(charsetMapperClass);
            this.charsetMapper = (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            ExceptionUtils.handleThrowable(t);
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:lams    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class clazz = Class.forName(charsetMapperClass);
            this.charsetMapper =
              (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:jerrydog    文件:ResponseBase.java   
/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
public void setLocale(Locale locale) {

    if (isCommitted())
        return;

    if (included)
        return;     // Ignore any call from an included servlet

    this.locale = locale;
    if (this.context != null) {
        CharsetMapper mapper = context.getCharsetMapper();
        this.encoding = mapper.getCharset(locale);
        if (contentType != null) {
            if (contentType.indexOf(';') < 0) {
                contentType = contentType + ";charset=" + encoding;
            } else {
                // Replace the previous charset
                int i = contentType.indexOf(';');
                contentType = contentType.substring(0, i)
                    + ";charset=" + encoding;
            }
        }
    }

}
项目:jerrydog    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class clazz = Class.forName(charsetMapperClass);
            this.charsetMapper =
              (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:apache-tomcat-7.0.73-with-comment    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
@Override
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            //CharsetMapper
            Class<?> clazz = Class.forName(charsetMapperClass);
            this.charsetMapper = (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            ExceptionUtils.handleThrowable(t);
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:lazycat    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
@Override
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class<?> clazz = Class.forName(charsetMapperClass);
            this.charsetMapper = (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            ExceptionUtils.handleThrowable(t);
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:class-guard    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
@Override
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class<?> clazz = Class.forName(charsetMapperClass);
            this.charsetMapper = (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            ExceptionUtils.handleThrowable(t);
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:apache-tomcat-7.0.57    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
@Override
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class<?> clazz = Class.forName(charsetMapperClass);
            this.charsetMapper = (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            ExceptionUtils.handleThrowable(t);
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:apache-tomcat-7.0.57    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
@Override
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class<?> clazz = Class.forName(charsetMapperClass);
            this.charsetMapper = (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            ExceptionUtils.handleThrowable(t);
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:HowTomcatWorks    文件:ResponseBase.java   
/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
public void setLocale(Locale locale) {

    if (isCommitted())
        return;

    if (included)
        return;     // Ignore any call from an included servlet

    this.locale = locale;
    if (this.context != null) {
        CharsetMapper mapper = context.getCharsetMapper();
        this.encoding = mapper.getCharset(locale);
        if (contentType != null) {
            if (contentType.indexOf(';') < 0) {
                contentType = contentType + ";charset=" + encoding;
            } else {
                // Replace the previous charset
                int i = contentType.indexOf(';');
                contentType = contentType.substring(0, i)
                    + ";charset=" + encoding;
            }
        }
    }

}
项目:HowTomcatWorks    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class clazz = Class.forName(charsetMapperClass);
            this.charsetMapper =
              (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:WBSAirback    文件:StandardContext.java   
/**
 * Return the Locale to character set mapper for this Context.
 */
@Override
public CharsetMapper getCharsetMapper() {

    // Create a mapper the first time it is requested
    if (this.charsetMapper == null) {
        try {
            Class<?> clazz = Class.forName(charsetMapperClass);
            this.charsetMapper = (CharsetMapper) clazz.newInstance();
        } catch (Throwable t) {
            ExceptionUtils.handleThrowable(t);
            this.charsetMapper = new CharsetMapper();
        }
    }

    return (this.charsetMapper);

}
项目:tomcat7    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
@Override
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if( mapper != null )
        this.charsetMapperClass= mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:lams    文件:Response.java   
/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
public void setLocale(Locale locale) {

    if (isCommitted())
        return;

    // Ignore any call from an included servlet
    if (included)
        return;

    coyoteResponse.setLocale(locale);

    // Ignore any call made after the getWriter has been invoked.
    // The default should be used
    if (usingWriter)
        return;

    if (isCharacterEncodingSet) {
        return;
    }

    CharsetMapper cm = getContext().getCharsetMapper();
    String charset = cm.getCharset( locale );
    if ( charset != null ){
        coyoteResponse.setCharacterEncoding(charset);
    }

}
项目:lams    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if( mapper != null )
        this.charsetMapperClass= mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:jerrydog    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:apache-tomcat-7.0.73-with-comment    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
@Override
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if( mapper != null )
        this.charsetMapperClass= mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:lazycat    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper
 *            The new mapper
 */
@Override
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if (mapper != null)
        this.charsetMapperClass = mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper, this.charsetMapper);

}
项目:class-guard    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
@Override
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if( mapper != null )
        this.charsetMapperClass= mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:apache-tomcat-7.0.57    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
@Override
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if( mapper != null )
        this.charsetMapperClass= mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:apache-tomcat-7.0.57    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
@Override
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if( mapper != null )
        this.charsetMapperClass= mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:HowTomcatWorks    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:WBSAirback    文件:Response.java   
/**
 * Set the Locale that is appropriate for this response, including
 * setting the appropriate character encoding.
 *
 * @param locale The new locale
 */
@Override
public void setLocale(Locale locale) {

    if (isCommitted())
        return;

    // Ignore any call from an included servlet
    if (included)
        return;

    coyoteResponse.setLocale(locale);

    // Ignore any call made after the getWriter has been invoked.
    // The default should be used
    if (usingWriter)
        return;

    if (isCharacterEncodingSet) {
        return;
    }

    CharsetMapper cm = getContext().getCharsetMapper();
    String charset = cm.getCharset( locale );
    if ( charset != null ){
        coyoteResponse.setCharacterEncoding(charset);
    }

}
项目:WBSAirback    文件:StandardContext.java   
/**
 * Set the Locale to character set mapper for this Context.
 *
 * @param mapper The new mapper
 */
@Override
public void setCharsetMapper(CharsetMapper mapper) {

    CharsetMapper oldCharsetMapper = this.charsetMapper;
    this.charsetMapper = mapper;
    if( mapper != null )
        this.charsetMapperClass= mapper.getClass().getName();
    support.firePropertyChange("charsetMapper", oldCharsetMapper,
                               this.charsetMapper);

}
项目:tomcat7    文件:FailedContext.java   
@Deprecated
@Override
public CharsetMapper getCharsetMapper() { return null; }
项目:tomcat7    文件:FailedContext.java   
@Deprecated
@Override
public void setCharsetMapper(CharsetMapper mapper) { /* NO-OP */ }
项目:tomcat7    文件:TesterContext.java   
@Override
@Deprecated
public CharsetMapper getCharsetMapper() {
    return null;
}
项目:tomcat7    文件:TesterContext.java   
@Override
@Deprecated
public void setCharsetMapper(CharsetMapper mapper) {
    // NO-OP
}
项目:jerrydog    文件:SimpleContext.java   
@Override
public CharsetMapper getCharsetMapper() {
    return null;
}
项目:apache-tomcat-7.0.73-with-comment    文件:FailedContext.java   
@Deprecated
@Override
public CharsetMapper getCharsetMapper() { return null; }
项目:apache-tomcat-7.0.73-with-comment    文件:FailedContext.java   
@Deprecated
@Override
public void setCharsetMapper(CharsetMapper mapper) { /* NO-OP */ }
项目:apache-tomcat-7.0.73-with-comment    文件:TesterContext.java   
@Override
@Deprecated
public CharsetMapper getCharsetMapper() {
    return null;
}
项目:apache-tomcat-7.0.73-with-comment    文件:TesterContext.java   
@Override
@Deprecated
public void setCharsetMapper(CharsetMapper mapper) {
    // NO-OP
}
项目:lazycat    文件:FailedContext.java   
@Deprecated
@Override
public CharsetMapper getCharsetMapper() {
    return null;
}
项目:lazycat    文件:FailedContext.java   
@Deprecated
@Override
public void setCharsetMapper(CharsetMapper mapper) {
    /* NO-OP */ }
项目:class-guard    文件:FailedContext.java   
@Deprecated
@Override
public CharsetMapper getCharsetMapper() { return null; }
项目:class-guard    文件:FailedContext.java   
@Deprecated
@Override
public void setCharsetMapper(CharsetMapper mapper) { /* NO-OP */ }
项目:class-guard    文件:TesterContext.java   
@Override
@Deprecated
public CharsetMapper getCharsetMapper() {
    return null;
}
项目:class-guard    文件:TesterContext.java   
@Override
@Deprecated
public void setCharsetMapper(CharsetMapper mapper) {
    // NO-OP
}
项目:apache-tomcat-7.0.57    文件:FailedContext.java   
@Deprecated
@Override
public CharsetMapper getCharsetMapper() { return null; }