Exemple #1
0
            public StoreArea(AbstractStore store, long id, long pointer, long fixed_size)
            {
                this.store = store;
                // Check the pointer is valid
                if (pointer != FixedAreaOffset) {
                    store.CheckPointer(pointer);
                }

                this.id = id;
                this.start_pointer = pointer;
                this.m_position = start_pointer;
                this.end_pointer = start_pointer + fixed_size;
            }
Exemple #2
0
            public StoreArea(AbstractStore store, long id, long pointer)
            {
                this.store = store;
                // Check the pointer is within the bounds of the data area of the file
                store.CheckPointer(pointer);

                store.ReadByteArrayFrom(pointer, buffer, 0, 8);
                long v = ByteBuffer.ReadInt8(buffer, 0);
                if ((v & DeletedFlag /* 0x08000000000000000L */) != 0) {
                    throw new IOException("Store being constructed on deleted area.");
                }

                long max_size = v - 16;
                this.id = id;
                this.start_pointer = pointer + 8;
                this.m_position = start_pointer;
                this.end_pointer = start_pointer + max_size;
            }