本文整理了Java中java.lang.StringBuffer.getChars()
方法的一些代码示例,展示了StringBuffer.getChars()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StringBuffer.getChars()
方法的具体详情如下:
包路径:java.lang.StringBuffer
类名称:StringBuffer
方法名:getChars
暂无
代码示例来源:origin: log4j/log4j
sbuf.getChars(start, sbuf.length(), previousTimeWithoutMillis, 0);
代码示例来源:origin: log4j/log4j
sbuf.getChars(start, sbuf.length(), lastTimeString, 0);
lastTime = now - millis;
代码示例来源:origin: looly/hutool
((StringBuilder) csq).getChars(0, len, this.value, index);
} else if (csq instanceof StringBuffer) {
((StringBuffer) csq).getChars(0, len, this.value, index);
} else if (csq instanceof StrBuilder) {
((StrBuilder) csq).getChars(0, len, this.value, index);
代码示例来源:origin: org.apache.commons/commons-lang3
/**
* Appends a string buffer to this string builder.
* Appending null will call {@link #appendNull()}.
*
* @param str the string buffer to append
* @return this, to enable chaining
*/
public StrBuilder append(final StringBuffer str) {
if (str == null) {
return appendNull();
}
final int strLen = str.length();
if (strLen > 0) {
final int len = length();
ensureCapacity(len + strLen);
str.getChars(0, strLen, buffer, len);
size += strLen;
}
return this;
}
代码示例来源:origin: looly/hutool
((StringBuilder) csq).getChars(0, len, this.value, index);
} else if (csq instanceof StringBuffer) {
((StringBuffer) csq).getChars(0, len, this.value, index);
} else if (csq instanceof StrBuilder) {
((StrBuilder) csq).getChars(0, len, this.value, index);
代码示例来源:origin: commons-lang/commons-lang
/**
* Appends a string buffer to this string builder.
* Appending null will call {@link #appendNull()}.
*
* @param str the string buffer to append
* @return this, to enable chaining
*/
public StrBuilder append(StringBuffer str) {
if (str == null) {
return appendNull();
}
int strLen = str.length();
if (strLen > 0) {
int len = length();
ensureCapacity(len + strLen);
str.getChars(0, strLen, buffer, len);
size += strLen;
}
return this;
}
代码示例来源:origin: robovm/robovm
available = strlen;
value.getChars(copyfrom, copyfrom + available, m_array[m_lastChunk],
m_firstFree);
代码示例来源:origin: xalan/xalan
available = strlen;
value.getChars(copyfrom, copyfrom + available, m_array[m_lastChunk],
m_firstFree);
代码示例来源:origin: org.apache.commons/commons-lang3
/**
* Appends part of a string buffer to this string builder.
* Appending null will call {@link #appendNull()}.
*
* @param str the string to append
* @param startIndex the start index, inclusive, must be valid
* @param length the length to append, must be valid
* @return this, to enable chaining
*/
public StrBuilder append(final StringBuffer str, final int startIndex, final int length) {
if (str == null) {
return appendNull();
}
if (startIndex < 0 || startIndex > str.length()) {
throw new StringIndexOutOfBoundsException("startIndex must be valid");
}
if (length < 0 || (startIndex + length) > str.length()) {
throw new StringIndexOutOfBoundsException("length must be valid");
}
if (length > 0) {
final int len = length();
ensureCapacity(len + length);
str.getChars(startIndex, startIndex + length, buffer, len);
size += length;
}
return this;
}
代码示例来源:origin: commons-lang/commons-lang
/**
* Appends part of a string buffer to this string builder.
* Appending null will call {@link #appendNull()}.
*
* @param str the string to append
* @param startIndex the start index, inclusive, must be valid
* @param length the length to append, must be valid
* @return this, to enable chaining
*/
public StrBuilder append(StringBuffer str, int startIndex, int length) {
if (str == null) {
return appendNull();
}
if (startIndex < 0 || startIndex > str.length()) {
throw new StringIndexOutOfBoundsException("startIndex must be valid");
}
if (length < 0 || (startIndex + length) > str.length()) {
throw new StringIndexOutOfBoundsException("length must be valid");
}
if (length > 0) {
int len = length();
ensureCapacity(len + length);
str.getChars(startIndex, startIndex + length, buffer, len);
size += length;
}
return this;
}
代码示例来源:origin: org.apache.lucene/lucene-core
System.arraycopy(cb.array(), cb.arrayOffset() + cb.position() + start, termBuffer, termLength, len);
} else if (csq instanceof StringBuffer) {
((StringBuffer) csq).getChars(start, end, termBuffer, termLength);
} else {
while (start < end)
代码示例来源:origin: org.apache.xmlbeans/xmlbeans
public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
{
assert _hasBufferedText;
_buffer.getChars(sourceStart, sourceStart + length, target, targetStart);
return length;
}
代码示例来源:origin: robovm/robovm
m_accumulator.getChars(0, nChars, chars, 0);
elem.setChars(chars);
代码示例来源:origin: xalan/xalan
m_accumulator.getChars(0, nChars, chars, 0);
elem.setChars(chars);
代码示例来源:origin: geotools/geotools
void characters(StringBuffer sb) throws SAXException {
int length = sb.length();
if (buffer == null || buffer.length < length) {
buffer = new char[length];
}
sb.getChars(0, length, buffer, 0);
characters(buffer, 0, length);
}
代码示例来源:origin: camunda/camunda-bpm-platform
sbuf.getChars(start, sbuf.length(), previousTimeWithoutMillis, 0);
代码示例来源:origin: apache/log4j
sbuf.getChars(start, sbuf.length(), previousTimeWithoutMillis, 0);
代码示例来源:origin: geotools/geotools
/**
* Calling this method should be the first thing done by {@link #endElement(String, String,
* String)}, to ensure the message passed to the expression factory contains the whole string
* accumulated by the potentially many calls to {@link #characters(char[], int, int)} done by
* the parser.
*
* @throws SAXException
*/
private void processCharacters() throws SAXException {
if (insideFilter) {
String message = this.characters.toString();
try {
if (insideDistance) {
LOGGER.finest("calling set distance on " + message + ", " + units);
filterFactory.setDistance(message, units);
} else {
LOGGER.finest("sending to expression factory: " + message);
expressionFactory.message(message, this.convertLiteralToNumber);
}
} catch (IllegalFilterException ife) {
throw new SAXException(ife);
}
} else if (characters.length() > 0) {
LOGGER.finer("delegating characters to parent: " + characters.toString());
int len = this.characters.length();
char[] chars = new char[this.characters.length()];
this.characters.getChars(0, len, chars, 0);
parent.characters(chars, 0, len);
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
sbuf.getChars(start, sbuf.length(), lastTimeString, 0);
lastTime = now - millis;
代码示例来源:origin: geotools/geotools
coordBuff.getChars(0, coordBuff.length(), buff, 0);
内容来源于网络,如有侵权,请联系作者删除!