{ "name": "VersionFile", "comment": "VersionFile records buffer changes and parameters necessary to reconstruct an\n older version of a LocalBufferFile.", "javadoc": "\u003ccode\u003eVersionFile\u003c/code\u003e records buffer changes and parameters necessary to reconstruct an\n older version of a LocalBufferFile.", "static": false, "implements": [], "extends": "java.lang.Object", "fields": [ { "name": "MAGIC_NUMBER", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "942486581" }, { "name": "VERSION_PARM_PREFIX", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.\"" }, { "name": "MAGIC_NUMBER_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.VersionFile\"" }, { "name": "ORIGINAL_FILE_ID_HI_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.OriginalIdHi\"" }, { "name": "ORIGINAL_FILE_ID_LOW_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.OriginalIdLow\"" }, { "name": "TARGET_FILE_ID_HI_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.TargetIdHi\"" }, { "name": "TARGET_FILE_ID_LOW_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.TargetIdLow\"" }, { "name": "ORIGINAL_BUFFER_COUNT_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.OrigBufCnt\"" }, { "name": "MAP_BUFFER_INDEX_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.MapIndex\"" }, { "name": "FREE_LIST_BUFFER_INDEX_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.FreeListIndex\"" }, { "name": "FREE_LIST_SIZE_PARM", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"~VF.FreeListSize\"" }, { "name": "BAD_FREE_LIST", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"Version file is corrupt - bad free list\"" }, { "name": "BAD_BUFFER_MAP", "comment": "", "javadoc": "", "static": true, "type_long": "java.lang.String", "type_short": "String", "constant_value": "\"Version file is corrupt - bad buffer map\"" }, { "name": "NEXT_BUFFER_INDEX_OFFSET", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "0" }, { "name": "FIRST_ENTRY_OFFSET", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "4" }, { "name": "BUFFER_MAP_ENTRY_SIZE", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "8" }, { "name": "FREE_LIST_ENTRY_SIZE", "comment": "", "javadoc": "", "static": true, "type_long": "int", "type_short": "int", "constant_value": "4" }, { "name": "file", "comment": "", "javadoc": "", "static": false, "type_long": "java.io.File", "type_short": "File", "constant_value": null }, { "name": "lastModified", "comment": "", "javadoc": "", "static": false, "type_long": "long", "type_short": "long", "constant_value": null }, { "name": "readOnly", "comment": "", "javadoc": "", "static": false, "type_long": "boolean", "type_short": "boolean", "constant_value": null }, { "name": "bufferSize", "comment": "", "javadoc": "", "static": false, "type_long": "int", "type_short": "int", "constant_value": null }, { "name": "originalBufCount", "comment": "", "javadoc": "", "static": false, "type_long": "int", "type_short": "int", "constant_value": null }, { "name": "initialBufCount", "comment": "", "javadoc": "", "static": false, "type_long": "int", "type_short": "int", "constant_value": null }, { "name": "versionFile", "comment": "", "javadoc": "", "static": false, "type_long": "db.buffers.BufferFile", "type_short": "BufferFile", "constant_value": null }, { "name": "targetFileId", "comment": "", "javadoc": "", "static": false, "type_long": "long", "type_short": "long", "constant_value": null }, { "name": "originalFileId", "comment": "", "javadoc": "", "static": false, "type_long": "long", "type_short": "long", "constant_value": null }, { "name": "vfIndexProvider", "comment": "", "javadoc": "", "static": false, "type_long": "db.buffers.IndexProvider", "type_short": "IndexProvider", "constant_value": null }, { "name": "freeIndexes", "comment": "", "javadoc": "", "static": false, "type_long": "int[]", "type_short": "int[]", "constant_value": null }, { "name": "bufferIndexMap", "comment": "", "javadoc": "", "static": false, "type_long": "ghidra.util.datastruct.IntIntHashtable", "type_short": "IntIntHashtable", "constant_value": null }, { "name": "newMapIds", "comment": "", "javadoc": "", "static": false, "type_long": "ghidra.util.datastruct.IntArrayList", "type_short": "IntArrayList", "constant_value": null }, { "name": "lastMapBuffer", "comment": "", "javadoc": "", "static": false, "type_long": "db.buffers.DataBuffer", "type_short": "DataBuffer", "constant_value": null }, { "name": "lastMapIndex", "comment": "", "javadoc": "", "static": false, "type_long": "int", "type_short": "int", "constant_value": null }, { "name": "nextMapEntryOffset", "comment": "", "javadoc": "", "static": false, "type_long": "int", "type_short": "int", "constant_value": null } ], "methods": [ { "name": "\u003cinit\u003e", "comment": "Construct a new version file for output.", "javadoc": "Construct a new version file for output.\n@param originalBf the original buffer file which is to be reconstructed\n from this version file.\n@param targetBf the buffer file to which this version file will be applied.\n@param vfile version buffer file to be created\n@throws IOException if vfile already exists or an IO error occurs", "static": false, "params": [ { "name": "originalBf", "type_long": "db.buffers.LocalBufferFile", "type_short": "LocalBufferFile", "comment": "the original buffer file which is to be reconstructed\n from this version file." }, { "name": "targetBf", "type_long": "db.buffers.LocalBufferFile", "type_short": "LocalBufferFile", "comment": "the buffer file to which this version file will be applied." }, { "name": "vfile", "type_long": "java.io.File", "type_short": "File", "comment": "version buffer file to be created" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if vfile already exists or an IO error occurs" } ] }, { "name": "\u003cinit\u003e", "comment": "Construct a read-only version file.", "javadoc": "Construct a read-only version file.\n@param vfile an existing version file\n@throws IOException", "static": false, "params": [ { "name": "vfile", "type_long": "java.io.File", "type_short": "File", "comment": "an existing version file" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "\u003cinit\u003e", "comment": "Construct a read-only version file.", "javadoc": "Construct a read-only version file.\n@param versionFile an existing version file open read-only\n@throws IOException", "static": false, "params": [ { "name": "versionFile", "type_long": "db.buffers.BufferFile", "type_short": "BufferFile", "comment": "an existing version file open read-only" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "abort", "comment": "Abort the creation/update of this version file.\n This method should be invoked in place of close on a failure condition.\n An attempt is made to restore the version file to its initial state\n or remove it if it was new.", "javadoc": "Abort the creation/update of this version file.\n This method should be invoked in place of close on a failure condition.\n An attempt is made to restore the version file to its initial state\n or remove it if it was new.\n@throws IOException", "static": false, "params": [], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "close", "comment": "Close the version file.", "javadoc": "Close the version file.", "static": false, "params": [], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "open", "comment": "Reopen version file as read-only", "javadoc": "Reopen version file as read-only\n@throws IOException", "static": false, "params": [], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "parseFile", "comment": "", "javadoc": "", "static": false, "params": [], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "updateBufferMap", "comment": "", "javadoc": "", "static": false, "params": [], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "readBufferMap", "comment": "", "javadoc": "", "static": false, "params": [ { "name": "mapIndex", "type_long": "int", "type_short": "int", "comment": "" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "saveFreeIndexList", "comment": "", "javadoc": "", "static": false, "params": [], "return": { "type_long": "int", "type_short": "int", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "readFreeIndexList", "comment": "", "javadoc": "", "static": false, "params": [ { "name": "listIndex", "type_long": "int", "type_short": "int", "comment": "" }, { "name": "size", "type_long": "int", "type_short": "int", "comment": "" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "setTargetFileId", "comment": "Change the file ID associated with the buffer file to which this version \n file can be applied.", "javadoc": "Change the file ID associated with the buffer file to which this version \n file can be applied.\n@param fileId file ID", "static": false, "params": [ { "name": "fileId", "type_long": "long", "type_short": "long", "comment": "file ID" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "isPutOK", "comment": "Returns true if this version file will accept old buffer data for the specified buffer index.", "javadoc": "Returns true if this version file will accept old buffer data for the specified buffer index.\n@param index buffer index", "static": false, "params": [ { "name": "index", "type_long": "int", "type_short": "int", "comment": "buffer index" } ], "return": { "type_long": "boolean", "type_short": "boolean", "comment": "" }, "throws": [] }, { "name": "isFreeIndex", "comment": "Returns true if the specified index was free in the original file.", "javadoc": "Returns true if the specified index was free in the original file.\n@param index", "static": false, "params": [ { "name": "index", "type_long": "int", "type_short": "int", "comment": "" } ], "return": { "type_long": "boolean", "type_short": "boolean", "comment": "" }, "throws": [] }, { "name": "getFreeIndexList", "comment": "Returns the list of free indexes associated with the original\n buffer file.", "javadoc": "Returns the list of free indexes associated with the original\n buffer file.", "static": false, "params": [], "return": { "type_long": "int[]", "type_short": "int[]", "comment": "" }, "throws": [] }, { "name": "putOldBuffer", "comment": "Store original buffer which has been modified in the target. When reverting to \n the original file version, these buffers should replace the newer version.", "javadoc": "Store original buffer which has been modified in the target. When reverting to \n the original file version, these buffers should replace the newer version.\n@param buf old buffer\n@throws IOException if an IO error occurs", "static": false, "params": [ { "name": "buf", "type_long": "db.buffers.DataBuffer", "type_short": "DataBuffer", "comment": "old buffer" }, { "name": "index", "type_long": "int", "type_short": "int", "comment": "" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if an IO error occurs" } ] }, { "name": "getOldBuffer", "comment": "Get original buffer associated with the specified storage index in the \n original file.", "javadoc": "Get original buffer associated with the specified storage index in the \n original file.\n@param buf data buffer\n@param index storage index\n@return data buffer or null if buffer has not been modified\n@throws IOException if an IO error occurs", "static": false, "params": [ { "name": "buf", "type_long": "db.buffers.DataBuffer", "type_short": "DataBuffer", "comment": "data buffer" }, { "name": "index", "type_long": "int", "type_short": "int", "comment": "storage index" } ], "return": { "type_long": "db.buffers.DataBuffer", "type_short": "DataBuffer", "comment": "data buffer or null if buffer has not been modified" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if an IO error occurs" } ] }, { "name": "getOldBufferIndexes", "comment": "Returns list of original buffer indexes stored within this file.\n These indexes reflect those buffers which have been modified since\n the original version.", "javadoc": "Returns list of original buffer indexes stored within this file.\n These indexes reflect those buffers which have been modified since\n the original version.", "static": false, "params": [], "return": { "type_long": "int[]", "type_short": "int[]", "comment": "" }, "throws": [] }, { "name": "getTargetFileID", "comment": "Returns file ID for buffer file to which this version file may be applied.", "javadoc": "Returns file ID for buffer file to which this version file may be applied.", "static": false, "params": [], "return": { "type_long": "long", "type_short": "long", "comment": "" }, "throws": [] }, { "name": "getOriginalFileID", "comment": "Returns file ID for original buffer file which may be produced with this version file.", "javadoc": "Returns file ID for original buffer file which may be produced with this version file.", "static": false, "params": [], "return": { "type_long": "long", "type_short": "long", "comment": "" }, "throws": [] }, { "name": "getOriginalBufferCount", "comment": "Returns buffer count for original buffer file.", "javadoc": "Returns buffer count for original buffer file.", "static": false, "params": [], "return": { "type_long": "int", "type_short": "int", "comment": "" }, "throws": [] }, { "name": "getOldParameterNames", "comment": "Returns a list of parameters defined within the original beffer file.", "javadoc": "Returns a list of parameters defined within the original beffer file.\n@throws IOException", "static": false, "params": [], "return": { "type_long": "java.lang.String[]", "type_short": "java.lang.String[]", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] }, { "name": "getOldParameter", "comment": "Get a parameter value associated with the original buffer file.", "javadoc": "Get a parameter value associated with the original buffer file.\n@param name parameter name\n@return parameter value\n@throws IOException", "static": false, "params": [ { "name": "name", "type_long": "java.lang.String", "type_short": "String", "comment": "parameter name" } ], "return": { "type_long": "int", "type_short": "int", "comment": "parameter value" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "" } ] } ] }