aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/fieldvalue/rawfieldvalue.cpp
blob: ab17a879dfabbd7809def6a10c713489a3905404 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "rawfieldvalue.h"
#include "literalfieldvalue.hpp"
#include <vespa/document/util/stringutil.h>
#include <vespa/vespalib/util/xmlstream.h>

using namespace vespalib::xml;

namespace document {

void
RawFieldValue::printXml(XmlOutputStream& out) const
{
    out << XmlBase64Content()
        << XmlContentWrapper(_value.data(), _value.size());
}

void
RawFieldValue::print(std::ostream& out, bool, const std::string&) const
{
    StringUtil::printAsHex(out, _value.data(), _value.size());
}

} // document