gpt4 book ai didi

com.ctc.wstx.api.WriterConfig.allocMediumCBuffer()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 22:51:05 26 4
gpt4 key购买 nike

本文整理了Java中com.ctc.wstx.api.WriterConfig.allocMediumCBuffer()方法的一些代码示例,展示了WriterConfig.allocMediumCBuffer()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriterConfig.allocMediumCBuffer()方法的具体详情如下:
包路径:com.ctc.wstx.api.WriterConfig
类名称:WriterConfig
方法名:allocMediumCBuffer

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);
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com