当前位置: 首页>>代码示例>>Java>>正文


Java CharChunk.equals方法代码示例

本文整理汇总了Java中org.apache.tomcat.util.buf.CharChunk.equals方法的典型用法代码示例。如果您正苦于以下问题:Java CharChunk.equals方法的具体用法?Java CharChunk.equals怎么用?Java CharChunk.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tomcat.util.buf.CharChunk的用法示例。


在下文中一共展示了CharChunk.equals方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: exactFind

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Exact mapping.
 */
private final void internalMapExactWrapper
    (Wrapper[] wrappers, CharChunk path, MappingData mappingData) {
    Wrapper wrapper = exactFind(wrappers, path);
    if (wrapper != null) {
        mappingData.requestPath.setString(wrapper.name);
        mappingData.wrapper = wrapper.object;
        if (path.equals("/")) {
            // Special handling for Context Root mapped servlet
            mappingData.pathInfo.setString("/");
            mappingData.wrapperPath.setString("");
            // This seems wrong but it is what the spec says...
            mappingData.contextPath.setString("");
        } else {
            mappingData.wrapperPath.setString(wrapper.name);
        }
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:21,代码来源:Mapper.java

示例2: internalMapExactWrapper

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Exact mapping.
 */
private final void internalMapExactWrapper(Wrapper[] wrappers, CharChunk path, MappingData mappingData) {
	Wrapper wrapper = exactFind(wrappers, path);
	if (wrapper != null) {
		mappingData.requestPath.setString(wrapper.name);
		mappingData.wrapper = wrapper.object;
		if (path.equals("/")) {
			// Special handling for Context Root mapped servlet
			mappingData.pathInfo.setString("/");
			mappingData.wrapperPath.setString("");
			// This seems wrong but it is what the spec says...
			mappingData.contextPath.setString("");
		} else {
			mappingData.wrapperPath.setString(wrapper.name);
		}
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:20,代码来源:Mapper.java

示例3: find

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Exact mapping.
 */
private final void internalMapExactWrapper
    (Wrapper[] wrappers, CharChunk path, MappingData mappingData) {
    int pos = find(wrappers, path);
    if ((pos != -1) && (path.equals(wrappers[pos].name))) {
        mappingData.requestPath.setString(wrappers[pos].name);
        mappingData.wrapper = wrappers[pos].object;
        if (path.equals("/")) {
            // Special handling for Context Root mapped servlet
            mappingData.pathInfo.setString("/");
            mappingData.wrapperPath.setString("");
            // This seems wrong but it is what the spec says...
            mappingData.contextPath.setString("");
        } else {
            mappingData.wrapperPath.setString(wrappers[pos].name);
        }
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:21,代码来源:Mapper.java

示例4: find

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Exact mapping.
 */
private final void internalMapExactWrapper
    (Wrapper[] wrappers, CharChunk path, MappingData mappingData) {
    int pos = find(wrappers, path);
    if ((pos != -1) && (path.equals(wrappers[pos].name))) {
        mappingData.requestPath.setString(wrappers[pos].name);
        mappingData.wrapperPath.setString(wrappers[pos].name);
        mappingData.wrapper = wrappers[pos].object;
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:Mapper.java

示例5: for

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Extension mappings.
 */
private final void internalMapExtensionWrapper
    (Wrapper[] wrappers, CharChunk path, MappingData mappingData) {
    char[] buf = path.getBuffer();
    int pathEnd = path.getEnd();
    int servletPath = path.getOffset();
    int slash = -1;
    for (int i = pathEnd - 1; i >= servletPath; i--) {
        if (buf[i] == '/') {
            slash = i;
            break;
        }
    }
    if (slash >= 0) {
        int period = -1;
        for (int i = pathEnd - 1; i > slash; i--) {
            if (buf[i] == '.') {
                period = i;
                break;
            }
        }
        if (period >= 0) {
            path.setOffset(period + 1);
            path.setEnd(pathEnd);
            int pos = find(wrappers, path);
            if ((pos != -1)
                && (path.equals(wrappers[pos].name))) {
                mappingData.wrapperPath.setChars
                    (buf, servletPath, pathEnd - servletPath);
                mappingData.requestPath.setChars
                    (buf, servletPath, pathEnd - servletPath);
                mappingData.wrapper = wrappers[pos].object;
            }
            path.setOffset(servletPath);
            path.setEnd(pathEnd);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:41,代码来源:Mapper.java

示例6: exactFind

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Find a map element given its name in a sorted array of map elements. This
 * will return the element that you were searching for. Otherwise it will
 * return <code>null</code>.
 */
private static final <E extends MapElement> E exactFind(E[] map, CharChunk name) {
	int pos = find(map, name);
	if (pos >= 0) {
		E result = map[pos];
		if (name.equals(result.name)) {
			return result;
		}
	}
	return null;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:16,代码来源:Mapper.java

示例7: internalMapExtensionWrapper

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Extension mappings.
 *
 * @param wrappers          Set of wrappers to check for matches
 * @param path              Path to map
 * @param mappingData       Mapping data for result
 * @param resourceExpected  Is this mapping expecting to find a resource
 */
private final void internalMapExtensionWrapper(Wrapper[] wrappers,
        CharChunk path, MappingData mappingData, boolean resourceExpected) {
    char[] buf = path.getBuffer();
    int pathEnd = path.getEnd();
    int servletPath = path.getOffset();
    int slash = -1;
    for (int i = pathEnd - 1; i >= servletPath; i--) {
        if (buf[i] == '/') {
            slash = i;
            break;
        }
    }
    if (slash >= 0) {
        int period = -1;
        for (int i = pathEnd - 1; i > slash; i--) {
            if (buf[i] == '.') {
                period = i;
                break;
            }
        }
        if (period >= 0) {
            path.setOffset(period + 1);
            path.setEnd(pathEnd);
            int pos = find(wrappers, path);
            if ((pos != -1) && (path.equals(wrappers[pos].name)) &&
                    (resourceExpected || !wrappers[pos].resourceOnly)) {
                mappingData.wrapperPath.setChars
                    (buf, servletPath, pathEnd - servletPath);
                mappingData.requestPath.setChars
                    (buf, servletPath, pathEnd - servletPath);
                mappingData.wrapper = wrappers[pos].object;
            }
            path.setOffset(servletPath);
            path.setEnd(pathEnd);
        }
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:46,代码来源:Mapper.java

示例8: internalMapExtensionWrapper

import org.apache.tomcat.util.buf.CharChunk; //导入方法依赖的package包/类
/**
 * Extension mappings.
 * 
 * @param wrappers          Set of wrappers to check for matches
 * @param path              Path to map
 * @param mappingData       Mapping data for result
 * @param resourceExpected  Is this mapping expecting to find a resource
 */
private final void internalMapExtensionWrapper(Wrapper[] wrappers,
        CharChunk path, MappingData mappingData, boolean resourceExpected) {
    char[] buf = path.getBuffer();
    int pathEnd = path.getEnd();
    int servletPath = path.getOffset();
    int slash = -1;
    for (int i = pathEnd - 1; i >= servletPath; i--) {
        if (buf[i] == '/') {
            slash = i;
            break;
        }
    }
    if (slash >= 0) {
        int period = -1;
        for (int i = pathEnd - 1; i > slash; i--) {
            if (buf[i] == '.') {
                period = i;
                break;
            }
        }
        if (period >= 0) {
            path.setOffset(period + 1);
            path.setEnd(pathEnd);
            int pos = find(wrappers, path);
            if ((pos != -1) && (path.equals(wrappers[pos].name)) &&
                    (resourceExpected || !wrappers[pos].resourceOnly)) {
                mappingData.wrapperPath.setChars
                    (buf, servletPath, pathEnd - servletPath);
                mappingData.requestPath.setChars
                    (buf, servletPath, pathEnd - servletPath);
                mappingData.wrapper = wrappers[pos].object;
            }
            path.setOffset(servletPath);
            path.setEnd(pathEnd);
        }
    }
}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:46,代码来源:Mapper.java


注:本文中的org.apache.tomcat.util.buf.CharChunk.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。