- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.ctc.wstx.api.WriterConfig.allocMediumCBuffer()
方法的一些代码示例,展示了WriterConfig.allocMediumCBuffer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriterConfig.allocMediumCBuffer()
方法的具体详情如下:
包路径:com.ctc.wstx.api.WriterConfig
类名称:WriterConfig
方法名:allocMediumCBuffer
[英]Method called to allocate intermediate recyclable copy buffers
[中]方法来分配中间的可回收拷贝缓冲区
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl
protected final char[] getCopyBuffer()
{
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
return buf;
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl
protected final char[] getCopyBuffer(int minLen)
{
char[] buf = mCopyBuffer;
if (buf == null || minLen > buf.length) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(Math.max(DEFAULT_COPYBUFFER_LEN, minLen));
}
return buf;
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl
protected void doWriteNamespace(String prefix, String nsURI)
throws XMLStreamException
{
try {
int vlen = nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl
protected void doWriteDefaultNs(String nsURI)
throws XMLStreamException
{
try {
int vlen = (nsURI == null) ? 0 : nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl
protected final char[] getCopyBuffer()
{
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
return buf;
}
代码示例来源:origin: com.fasterxml.woodstox/woodstox-core
protected final char[] getCopyBuffer()
{
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
return buf;
}
代码示例来源:origin: Nextdoor/bender
protected final char[] getCopyBuffer()
{
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
return buf;
}
代码示例来源:origin: FasterXML/woodstox
protected final char[] getCopyBuffer()
{
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
return buf;
}
代码示例来源:origin: com.fasterxml.woodstox/woodstox-core
protected final char[] getCopyBuffer(int minLen)
{
char[] buf = mCopyBuffer;
if (buf == null || minLen > buf.length) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(Math.max(DEFAULT_COPYBUFFER_LEN, minLen));
}
return buf;
}
代码示例来源:origin: Nextdoor/bender
protected final char[] getCopyBuffer(int minLen)
{
char[] buf = mCopyBuffer;
if (buf == null || minLen > buf.length) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(Math.max(DEFAULT_COPYBUFFER_LEN, minLen));
}
return buf;
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl
protected final char[] getCopyBuffer(int minLen)
{
char[] buf = mCopyBuffer;
if (buf == null || minLen > buf.length) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(Math.max(DEFAULT_COPYBUFFER_LEN, minLen));
}
return buf;
}
代码示例来源:origin: FasterXML/woodstox
protected final char[] getCopyBuffer(int minLen)
{
char[] buf = mCopyBuffer;
if (buf == null || minLen > buf.length) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(Math.max(DEFAULT_COPYBUFFER_LEN, minLen));
}
return buf;
}
代码示例来源:origin: com.fasterxml.woodstox/woodstox-core
protected void doWriteNamespace(String prefix, String nsURI)
throws XMLStreamException
{
try {
int vlen = nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: com.fasterxml.woodstox/woodstox-core
protected void doWriteDefaultNs(String nsURI)
throws XMLStreamException
{
try {
int vlen = (nsURI == null) ? 0 : nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: Nextdoor/bender
protected void doWriteNamespace(String prefix, String nsURI)
throws XMLStreamException
{
try {
int vlen = nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: FasterXML/woodstox
protected void doWriteDefaultNs(String nsURI)
throws XMLStreamException
{
try {
int vlen = (nsURI == null) ? 0 : nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl
protected void doWriteDefaultNs(String nsURI)
throws XMLStreamException
{
try {
int vlen = (nsURI == null) ? 0 : nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl
protected void doWriteNamespace(String prefix, String nsURI)
throws XMLStreamException
{
try {
int vlen = nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, prefix, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
代码示例来源:origin: Nextdoor/bender
protected void doWriteDefaultNs(String nsURI)
throws XMLStreamException
{
try {
int vlen = (nsURI == null) ? 0 : nsURI.length();
// Worthwhile to make a local copy?
if (vlen >= ATTR_MIN_ARRAYCOPY) {
char[] buf = mCopyBuffer;
if (buf == null) {
mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN);
}
// Let's not bother with too long, though
if (vlen <= buf.length) {
nsURI.getChars(0, vlen, buf, 0);
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, buf, 0, vlen);
return;
}
}
mWriter.writeAttribute(XMLConstants.XMLNS_ATTRIBUTE, nsURI);
} catch (IOException ioe) {
throw new WstxIOException(ioe);
}
}
本文整理了Java中com.ctc.wstx.api.WriterConfig.allocMediumCBuffer()方法的一些代码示例,展示了WriterConfig.allocMediumCBu
我是一名优秀的程序员,十分优秀!