本文整理汇总了C#中com.appendQuotedUTF8方法的典型用法代码示例。如果您正苦于以下问题:C# com.appendQuotedUTF8方法的具体用法?C# com.appendQuotedUTF8怎么用?C# com.appendQuotedUTF8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com
的用法示例。
在下文中一共展示了com.appendQuotedUTF8方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: writeFieldName
/// <exception cref="System.IO.IOException"/>
public override void writeFieldName(com.fasterxml.jackson.core.SerializableString
name)
{
if (_cfgPrettyPrinter != null)
{
_writePPFieldName(name);
return;
}
int status = _writeContext.writeFieldName(name.getValue());
if (status == com.fasterxml.jackson.core.json.JsonWriteContext.STATUS_EXPECT_VALUE)
{
_reportError("Can not write a field name, expecting a value");
}
if (status == com.fasterxml.jackson.core.json.JsonWriteContext.STATUS_OK_AFTER_COMMA)
{
if (_outputTail >= _outputEnd)
{
_flushBuffer();
}
_outputBuffer[_outputTail++] = BYTE_COMMA;
}
if (_cfgUnqNames)
{
_writeUnq(name);
return;
}
if (_outputTail >= _outputEnd)
{
_flushBuffer();
}
_outputBuffer[_outputTail++] = BYTE_QUOTE;
int len = name.appendQuotedUTF8(_outputBuffer, _outputTail);
if (len < 0)
{
// couldn't append, bit longer processing
_writeBytes(name.asQuotedUTF8());
}
else
{
_outputTail += len;
}
if (_outputTail >= _outputEnd)
{
_flushBuffer();
}
_outputBuffer[_outputTail++] = BYTE_QUOTE;
}
示例2: writeString
/// <exception cref="System.IO.IOException"/>
public override sealed void writeString(com.fasterxml.jackson.core.SerializableString
text)
{
_verifyValueWrite(WRITE_STRING);
if (_outputTail >= _outputEnd)
{
_flushBuffer();
}
_outputBuffer[_outputTail++] = BYTE_QUOTE;
int len = text.appendQuotedUTF8(_outputBuffer, _outputTail);
if (len < 0)
{
_writeBytes(text.asQuotedUTF8());
}
else
{
_outputTail += len;
}
if (_outputTail >= _outputEnd)
{
_flushBuffer();
}
_outputBuffer[_outputTail++] = BYTE_QUOTE;
}
示例3: _writeUnq
/// <exception cref="System.IO.IOException"/>
private void _writeUnq(com.fasterxml.jackson.core.SerializableString name)
{
int len = name.appendQuotedUTF8(_outputBuffer, _outputTail);
if (len < 0)
{
_writeBytes(name.asQuotedUTF8());
}
else
{
_outputTail += len;
}
}