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


Java MessageBytes.T_CHARS属性代码示例

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


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

示例1: appendBytes

/**
 * Write a MessageBytes out at the current write position.
 * A null MessageBytes is encoded as a string with length 0.  
 */
public void appendBytes(MessageBytes mb) {
    if (mb == null) {
        log.error(sm.getString("ajpmessage.null"), 
                new NullPointerException());
        appendInt(0);
        appendByte(0);
        return;
    }
    if (mb.getType() == MessageBytes.T_BYTES) {
        ByteChunk bc = mb.getByteChunk();
        appendByteChunk(bc);
    } else if (mb.getType() == MessageBytes.T_CHARS) {
        CharChunk cc = mb.getCharChunk();
        appendCharChunk(cc);
    } else {
        appendString(mb.toString());
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:AjpMessage.java

示例2: appendBytes

/**
 * Write a MessageBytes out at the current write position. A null
 * MessageBytes is encoded as a string with length 0.
 */
public void appendBytes(MessageBytes mb) {
	if (mb == null) {
		log.error(sm.getString("ajpmessage.null"), new NullPointerException());
		appendInt(0);
		appendByte(0);
		return;
	}
	if (mb.getType() == MessageBytes.T_BYTES) {
		ByteChunk bc = mb.getByteChunk();
		appendByteChunk(bc);
	} else if (mb.getType() == MessageBytes.T_CHARS) {
		CharChunk cc = mb.getCharChunk();
		appendCharChunk(cc);
	} else {
		appendString(mb.toString());
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:21,代码来源:AjpMessage.java

示例3: write

/**
 * This method will write the contents of the specified message bytes 
 * buffer to the output stream, without filtering. This method is meant to
 * be used to write the response header.
 * 
 * @param mb data to be written
 */
protected void write(MessageBytes mb) {

    if (mb.getType() == MessageBytes.T_BYTES) {
        ByteChunk bc = mb.getByteChunk();
        write(bc);
    } else if (mb.getType() == MessageBytes.T_CHARS) {
        CharChunk cc = mb.getCharChunk();
        write(cc);
    } else {
        write(mb.toString());
    }

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:AbstractOutputBuffer.java

示例4: write

/**
 * This method will write the contents of the specyfied message bytes 
 * buffer to the output stream, without filtering. This method is meant to
 * be used to write the response header.
 * 
 * @param mb data to be written
 */
protected void write(MessageBytes mb) {

    if (mb.getType() == MessageBytes.T_BYTES) {
        ByteChunk bc = mb.getByteChunk();
        write(bc);
    } else if (mb.getType() == MessageBytes.T_CHARS) {
        CharChunk cc = mb.getCharChunk();
        write(cc);
    } else {
        write(mb.toString());
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:20,代码来源:InternalOutputBuffer.java

示例5: write

/**
 * This method will write the contents of the specified message bytes buffer
 * to the output stream, without filtering. This method is meant to be used
 * to write the response header.
 * 
 * @param mb
 *            data to be written
 */
protected void write(MessageBytes mb) {

	if (mb.getType() == MessageBytes.T_BYTES) {
		ByteChunk bc = mb.getByteChunk();
		write(bc);
	} else if (mb.getType() == MessageBytes.T_CHARS) {
		CharChunk cc = mb.getCharChunk();
		write(cc);
	} else {
		write(mb.toString());
	}

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:21,代码来源:AbstractOutputBuffer.java


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