init(int bufferSize) initialize members for buffer reuse.
Parameters: bsn - Logic Block Sequence Number of the buffer.BufferManager maintains a list of block sequence numbersto ensure correct order of writes to disk.
buffer Header format
byte[] HEADER_ID [1] "H"
short size of bytes written [2]
short total number of items [2]
byte[] CRLF [2] to make it easier to read buffers in an editor
initialize members for buffer reuse.
Parameters: bsn - Logic Block Sequence Number of the buffer.BufferManager maintains a list of block sequence numbersto ensure correct order of writes to disk. Some implementationsof LogBuffer may include the BSN as part of a record orblock header.
Reads a block from FileStore lf and validates
header and footer information.
See Also: LogBuffer.read(FileStorelong) throws: IOException - if anything goes wrong during the file read. throws: InvalidLogBufferException - if any of the block header or footer fields are invalid.