Add a cdata section to a StringBuffer.

If the buffer is null, a new one is created.

@param buffer
StringBuffer to fill
@param cdataContent
the cdata content
@return the buffer
4012
public static StringBuffer appendCdataSection(StringBuffer buffer, String cdataContent)
	{
		StringBuffer _buffer = initStringBufferIfNecessary(buffer);
		return doAppendCdataSection(_buffer, cdataContent);
	}
1346358
function _tag_cdata( &$parser, $cdata ) {
		switch( $this->currentElement ) {
			// Table constraint
			case 'CONSTRAINT':
				if( isset( $this->current_field ) ) {
					$this->addFieldOpt( $this->current_field, $this->currentElement, $cdata );
				} else {
					$this->addTableOpt( $cdata );
				}
				break;
			// Table option
			case 'OPT':
				$this->addTableOpt( $cdata );
				break;
			default:

		}
	}
467952
public JQMContent createContent() {
        JQMContent content = new JQMContent();
        Element elt = getElement();
        add(content, elt);
        return content;
    }
827715
@Override
    public void setContent(final InputStream content, final String contentType,
            final Collection<URI> checksums, final String originalFileName,
            final StoragePolicyDecisionPoint storagePolicyDecisionPoint)
            throws InvalidChecksumException {

        try {


            final Node dsNode = getNode();

            LOGGER.debug("Created content node at path: {}", dsNode.getPath());

            String hint = null;

            if (storagePolicyDecisionPoint != null) {
                hint = storagePolicyDecisionPoint.evaluatePolicies(this);
            }
            final ValueFactory modevf =
                    (ValueFactory) node.getSession().getValueFactory();
            final Binary binary = modevf.createBinary(content, hint);

        /*
         * This next line of code deserves explanation. If we chose for the
         * simpler line: Property dataProperty =
         * contentNode.setProperty(JCR_DATA, requestBodyStream); then the JCR
         * would not block on the stream's completion, and we would return to
         * the requester before the mutation to the repo had actually completed.
         * So instead we use createBinary(requestBodyStream), because its
         * contract specifies: "The passed InputStream is closed before this
         * method returns either normally or because of an exception." which
         * lets us block and not return until the job is done! The simpler code
         * may still be useful to us for an asynchronous method that we develop
         * later.
         */
            final Property dataProperty = dsNode.setProperty(JCR_DATA, binary);

            // Ensure provided checksums are valid
            final Collection<URI> nonNullChecksums = (null == checksums) ? new HashSet<>() : checksums;
            verifyChecksums(nonNullChecksums, dataProperty);

            final Node descNode = getDescriptionNodeOrNull();

            decorateContentNode(dsNode, descNode, nonNullChecksums);
            FedoraTypesUtils.touch(dsNode);

            if (descNode != null) {
                descNode.setProperty(HAS_MIME_TYPE, contentType);

                if (originalFileName != null) {
                    descNode.setProperty(FILENAME, originalFileName);
                }

                FedoraTypesUtils.touch(descNode);
            }

            LOGGER.debug("Created data property at path: {}", dataProperty.getPath());

        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
644258
private void writeBufferedData() throws IOException {
        if (buffer.length() > 0) {
            out.write(formatMessage(buffer.toString()).getBytes());
            out.write('\n');
            buffer = new StringBuffer();
        }
    }
844708
protected void addDescription(ClassDoc cd, Content dlTree) {
        Content link = getLink(new LinkInfoImpl(configuration,
                        LinkInfoImpl.Kind.INDEX, cd).strong(true));
        Content dt = HtmlTree.DT(link);
        dt.addContent(" - ");
        addClassInfo(cd, dt);
        dlTree.addContent(dt);
        Content dd = new HtmlTree(HtmlTag.DD);
        addComment(cd, dd);
        dlTree.addContent(dd);
    }
530180
private DataBuffer withDataBufferFactory(ByteBufHttpData data) {
        final byte[] dataArray = ByteBufUtil.getBytes(data.content());
        data.release();
        return delegate.wrap(dataArray);
    }
826917
public StringBuilder appendToBuffer(StringBuilder buf) {
    Iterator<double[]> iter = points.iterator();
    while(iter.hasNext()) {
      double[] data = iter.next();
      for(int i = 0; i < data.length; i++) {
        if(i > 0) {
          buf.append(',');
        }
        buf.append(data[i]);
      }
      if(iter.hasNext()) {
        buf.append(' ');
      }
    }
    return buf;
  }
1165019
@Override
    public void handleCDATASection(
            final char[] buffer,
            final int contentOffset, final int contentLen, final int outerOffset,
            final int outerLen, final int line, final int col)
            throws ParseException {

        if (!this.insideAllSelectorMatchingBlock) {

            this.someSelectorsMatch = false;
            for (int i = 0; i < this.selectorsLen; i++) {

                if (this.matchingMarkupLevelsPerSelector[i] > this.markupLevel) {
                    this.selectorMatches[i] =
                            this.selectorFilters[i].matchCDATASection(true, this.markupLevel, this.markupBlocks[this.markupLevel]);
                    if (this.selectorMatches[i]) {
                        this.someSelectorsMatch = true;
                    }
                } else {
                    this.selectorMatches[i] = true;
                    this.someSelectorsMatch = true;
                }

            }

            if (this.someSelectorsMatch) {
                markCurrentSelection();
                this.selectedHandler.handleCDATASection(
                        buffer, contentOffset, contentLen,
                        outerOffset, outerLen, line, col);
                unmarkCurrentSelection();
                return;
            }

            unmarkCurrentSelection();
            this.nonSelectedHandler.handleCDATASection(
                    buffer, contentOffset, contentLen,
                    outerOffset, outerLen, line, col);
            return;

        }

        markCurrentSelection();
        this.selectedHandler.handleCDATASection(buffer, contentOffset, contentLen, outerOffset, outerLen, line, col);
        unmarkCurrentSelection();

    }
1142357
public void add(String name, JsonBuffer value) {
		if (value != null && value != this && !value.isEmpty()) {
			this.content.put(name, value);
		}
	}
484025
public void startCDATA() throws org.xml.sax.SAXException
  {
    m_inCData = true;
    append(m_doc.createCDATASection(""));
  }
798116
private void encodeCodecData(final RevisionCodecData codecData)
		throws EncodingException
	{

		this.codecData = codecData;

		// C
		data.writeBit(0);
		data.writeBit(0);
		data.writeBit(0);

		// BLOCK SIZES - S E B L
		this.data.writeValue(5, codecData.getBlocksizeS());
		this.data.writeValue(5, codecData.getBlocksizeE());
		this.data.writeValue(5, codecData.getBlocksizeB());
		this.data.writeValue(5, codecData.getBlocksizeL());

		// 1 Bit
		data.writeFillBits();
	}
136666
protected void appendText(StringBuilder sb, Text aNode) {
        sb.append("<")
            .append(aNode.getParentNode().getNodeName())
            .append(" ...>");

        if (aNode instanceof CDATASection) {
            sb.append("<![CDATA[")
                .append(aNode.getNodeValue())
                .append("]]>");
        } else {
            sb.append(aNode.getNodeValue());
        }

        sb.append("</")
            .append(aNode.getParentNode().getNodeName())
            .append(">");
    }
368075
def cdata (self, data):
        
        data = data.encode(self.encoding, "ignore")
        self.fd.write("<![CDATA[%s]]>" % data)
36634
public function addCData($name, $cdata)
    {
        $nameUtf8 = $this->_toUTF8($name);
        $node = $this->_SimpleXmlElement->addChild($nameUtf8);
        $domnode = dom_import_simplexml($node);
        $no = $domnode->ownerDocument;
        $domnode->appendChild($no->createCDATASection($cdata));

        return new SimpleXMLExtended($node, $this->_encoding);
    }
446947
public void setBuffer(final String buffer) {
        initRandomBuffer();
        byteBufferAry = Arrays.copyOf(buffer.getBytes(), MAX_PACKETBUFFER_LENGTH);
    }
172277
def _from_cdata(cls, cdata: Any, order: str = "C") -> "Console":
        
        if isinstance(cdata, cls):
            return cdata
        self = object.__new__(cls)  # type: Console
        self.console_c = cdata
        self._init_setup_console_data(order)
        return self