public static Page Get(string path, uint pagenumber) { FileRecord record = FileRecord.Get(path, true); byte[] bytes = record.GetContent(); JetHeader header = new JetHeader(bytes); uint offset = GetPageOffset(pagenumber, header.PageSize); return Get(bytes, (int)offset); }
public static Page Get(string path, uint pagenumber) { FileRecord record = FileRecord.Get(path, true); byte[] bytes = record.GetContent(); JetHeader header = new JetHeader(bytes); uint offset = GetPageOffset(pagenumber, header.PageSize); return(Get(bytes, (int)offset)); }
private static Page[] GetInstances(byte[] bytes) { JetHeader header = new JetHeader(bytes); uint PageCount = ((uint)bytes.Length / header.PageSize) - 2; Page[] pageArray = new Page[PageCount]; for (uint i = 1; i < PageCount; i++) { pageArray[i - 1] = Get(bytes, (int)GetPageOffset(i, header.PageSize)); } return(pageArray); }
internal Page(byte[] bytes, int offset) { JetHeader h = new JetHeader(bytes); PageNumber = GetPageNumber((uint)offset, h.PageSize); Checksum = BitConverter.ToUInt64(bytes, 0x00 + offset); LastModificationTime = new JetDbTime(bytes, offset + 0x08); PreviousPageNumber = BitConverter.ToUInt32(bytes, 0x10 + offset); NextPageNumber = BitConverter.ToUInt32(bytes, 0x14 + offset); FatherDataPage = BitConverter.ToUInt32(bytes, 0x18 + offset); AvailableDataSize = BitConverter.ToUInt16(bytes, 0x1C + offset); AvailableUncommittedDataSize = BitConverter.ToUInt16(bytes, 0x1E + offset); FirstAvailableDataOffset = BitConverter.ToUInt16(bytes, 0x20 + offset); FirstAvailablePageTag = BitConverter.ToUInt16(bytes, 0x22 + offset); PageFlags = ((Page.JET_PAGEFLAGS)BitConverter.ToUInt32(bytes, 0x24 + offset)); Tags = DataTag.GetInstances(bytes, offset); }
private static Page[] GetInstances(byte[] bytes) { JetHeader header = new JetHeader(bytes); uint PageCount = ((uint)bytes.Length / header.PageSize) - 2; Page[] pageArray = new Page[PageCount]; for (uint i = 1; i < PageCount; i++) { pageArray[i - 1] = Get(bytes, (int)GetPageOffset(i, header.PageSize)); } return pageArray; }