MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / writeBinary_

Method writeBinary_

src/openms/source/FORMAT/HANDLERS/MzDataHandler.cpp:1483–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1481 }
1482
1483 inline void MzDataHandler::writeBinary_(std::ostream & os, Size size, const String & tag, const String & name, SignedSize id)
1484 {
1485 os << "\t\t\t<" << tag;
1486 if (tag == "supDataArrayBinary" || tag == "supDataArray")
1487 {
1488 os << " id=\"" << id << "\"";
1489 }
1490 os << ">\n";
1491 if (tag == "supDataArrayBinary" || tag == "supDataArray")
1492 {
1493 os << "\t\t\t\t<arrayName>" << name << "</arrayName>\n";
1494 }
1495
1496 String str;
1497 Base64::encode(data_to_encode_, Base64::BYTEORDER_LITTLEENDIAN, str);
1498 data_to_encode_.clear();
1499 os << "\t\t\t\t<data precision=\"32\" endian=\"little\" length=\""
1500 << size << "\">"
1501 << str
1502 << "</data>\n\t\t\t</" << tag << ">\n";
1503 }
1504
1505} // namespace OpenMS //namespace Internal

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected