Read() protected abstract method

protected abstract Read ( long offset, byte buffer, int index, int length ) : int
offset long
buffer byte
index int
length int
return int
示例#1
0
            public StoreArea(StoreBase store, long id, long offset, bool readOnly)
            {
                Store      = store;
                Id         = id;
                IsReadOnly = readOnly;

                store.CheckOffset(offset);

                store.Read(offset, buffer, 0, 8);
                long v = ByteBuffer.ReadInt8(buffer, 0);

                if ((v & DeletedFlag) != 0)
                {
                    throw new IOException("Store being constructed on deleted area.");
                }

                long maxSize = v - 16;

                StartOffset = offset + 8;
                position    = StartOffset;
                EndOffset   = StartOffset + maxSize;
            }
示例#2
0
            public StoreArea(StoreBase store, long id, long offset, bool readOnly)
            {
                Store = store;
                Id = id;
                IsReadOnly = readOnly;

                store.CheckOffset(offset);

                store.Read(offset, buffer, 0, 8);
                long v = ByteBuffer.ReadInt8(buffer, 0);
                if ((v & DeletedFlag) != 0)
                    throw new IOException("Store being constructed on deleted area.");

                long maxSize = v - 16;
                StartOffset = offset + 8;
                position = StartOffset;
                EndOffset = StartOffset + maxSize;
            }