예제 #1
0
BTreeIndexEntry::BTreeIndexEntry(QFile &file, qint64 off)
{
    PRINT_DBG("Reading BTree index entry at %lld", off);
    seekFile(file, off);
    QTextCodec *codec = getDefaultTextCodec();
    qint64 length = 0;
    this->fileName = readNullTerminatedString(file, codec, length);
    PRINT_DBG("        Filename: %s", this->fileName.toLocal8Bit().data());
    this->pageNumber = readUnsignedWord(file);
    PRINT_DBG("        Page Number: %d", this->pageNumber);
    this->sz = length + Q_INT64_C(2);
    PRINT_DBG("        BTree index entry size: %lld", this->sz);
    PRINT_DBG("BTree index entry loaded successfully");
}
// Read in a NULL terminated ascii (8-bit char) string byte by byte and take most
// significant byte first and convert to a OSCL_wString
bool AtomUtils::readNullTerminatedAsciiString(MP4_FF_FILE *fp, OSCL_wString& data)
{
    return readNullTerminatedString(fp, data);
}