本文整理了Java中org.apache.tomcat.util.buf.B2CConverter.reset()
方法的一些代码示例,展示了B2CConverter.reset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。B2CConverter.reset()
方法的具体详情如下:
包路径:org.apache.tomcat.util.buf.B2CConverter
类名称:B2CConverter
方法名:reset
暂无
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
/** Create a converter, with bytes going to a byte buffer
*/
public B2CConverter(String encoding)
throws IOException
{
this.encoding=encoding;
reset();
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
/** Create a converter, with bytes going to a byte buffer
*/
public B2CConverter(String encoding)
throws IOException
{
this.encoding=encoding;
reset();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/** Create a converter, with bytes going to a byte buffer
*/
public B2CConverter(String encoding)
throws IOException
{
this.encoding=encoding;
reset();
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
public void convert( ByteChunk bb, CharChunk cb, int limit)
throws IOException
{
iis.setByteChunk( bb );
try {
// read from the reader
int bbLengthBeforeRead = 0;
while( limit > 0 ) { // conv.ready() ) {
int size = limit < BUFFER_SIZE ? limit : BUFFER_SIZE;
bbLengthBeforeRead = bb.getLength();
int cnt=conv.read( result, 0, size );
if( cnt <= 0 ) {
// End of stream ! - we may be in a bad state
if( debug>0)
log( "EOF" );
return;
}
if( debug > 1 )
log("Converted: " + new String( result, 0, cnt ));
cb.append( result, 0, cnt );
limit = limit - (bbLengthBeforeRead - bb.getLength());
}
} catch( IOException ex) {
if( debug>0)
log( "Reseting the converter " + ex.toString() );
reset();
throw ex;
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public void convert( ByteChunk bb, CharChunk cb, int limit)
throws IOException
{
iis.setByteChunk( bb );
try {
// read from the reader
int bbLengthBeforeRead = 0;
while( limit > 0 ) { // conv.ready() ) {
int size = limit < BUFFER_SIZE ? limit : BUFFER_SIZE;
bbLengthBeforeRead = bb.getLength();
int cnt=conv.read( result, 0, size );
if( cnt <= 0 ) {
// End of stream ! - we may be in a bad state
if(log.isDebugEnabled())
log.debug("B2CConverter: EOF");
return;
}
if(log.isDebugEnabled())
log.debug("B2CConverter: Converted: " +
new String(result, 0, cnt));
cb.append( result, 0, cnt );
limit = limit - (bbLengthBeforeRead - bb.getLength());
}
} catch( IOException ex) {
if(log.isDebugEnabled())
log.debug("B2CConverter: Reseting the converter " + ex.toString());
reset();
throw ex;
}
}
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
log.debug("B2CConverter: Reseting the converter " + ex.toString());
reset();
throw ex;
内容来源于网络,如有侵权,请联系作者删除!