Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Woodstox 6.4.0 - Source Code Files
Woodstox 6.4.0 Source Code Files are provided at the Woodstox GitHub Website.
You can download them from the "src/main/java" folder.
You can also browse Woodstox Source Code files below:
✍: FYIcenter
⏎ com/ctc/wstx/util/TextAccumulator.java
package com.ctc.wstx.util;
/**
* Simple utility class used to efficiently accumulate and concatenate
* text passed in various forms
*/
public final class TextAccumulator
{
private String mText = null;
private StringBuilder mBuilder = null;
public TextAccumulator() { }
public boolean hasText() {
return (mBuilder != null) || (mText != null);
}
public void addText(String text)
{
int len = text.length();
if (len > 0) {
// Any prior text?
if (mText != null) {
mBuilder = new StringBuilder(mText.length() + len);
mBuilder.append(mText);
mText = null;
}
if (mBuilder != null) {
mBuilder.append(text);
} else {
mText = text;
}
}
}
public void addText(char[] buf, int start, int end)
{
int len = end-start;
if (len > 0) {
// Any prior text?
if (mText != null) {
mBuilder = new StringBuilder(mText.length() + len);
mBuilder.append(mText);
mText = null;
} else if (mBuilder == null) {
/* more efficient to use a builder than a string; and although
* could use a char array, StringBuilder has the benefit of
* being able to share the array, eventually.
*/
mBuilder = new StringBuilder(len);
}
mBuilder.append(buf, start, end-start);
}
}
public String getAndClear()
{
if (mText != null) {
String result = mText;
mText = null;
return result;
}
if (mBuilder != null) {
String result = mBuilder.toString();
mBuilder = null;
return result;
}
return "";
}
}
⏎ com/ctc/wstx/util/TextAccumulator.java
Or download all of them as a single archive file:
File name: woodstox-core-6.4.0-fyi.zip File size: 552992 bytes Release date: 2022-10-25 Download
⇒ woodstox-core-6.4.0.jar - Woodstox Core 6.4.0
⇐ What Is Woodstox XML Processing
2023-01-29, ≈45🔥, 0💬
Popular Posts:
What Is poi-5.2.3.jar? poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an...
How to download and install ojdbc11.jar for Oracle 21c? ojdbc11.jar for Oracle 21c is a Java JDBC Dr...
JDK 1.1 source code directory contains Java source code for JDK 1.1 core classes: "C:\fyicenter\jdk-...
JRE 5 sunjce_provider.jar is the JAR file for JRE 5 Sun JCE Provider, which provides implementations...
Apache Log4j IOStreams is a Log4j API extension that provides numerous classes from java.io that can...