SlottedPage for
managing pages of variable length records. The SlottedPage class is part
of the java cis552 package for a rudimentary DBMS buffer and file manager. You should read the
documentation for the cis552 package, paying
special attention to the SlottedPage class. A zip file with the cis552 library
(minus the SlottedPage class) and other materials can be downloaded here. We will
discuss the design of the cis552 package and the slotted
page structure in class.
Page called
SlottedPage. Its interface should be exactly the same as
the interface as described in the documentation.
Read the documentation carefully to understand
how each method should behave.
There are several additional requirements beyond what is stated in the
API documentation:
PAGE_SIZE.
You should use this constant in your code, so that no
modifications are needed when the page size changes.
people.db file you are given.
Write a main method to thoroughly test your SlottedPage class.
You will not be graded on your main method, but I will be running my own
tests, and I'm good at finding errors! You should expect to write at least as
much code to test your class as you do to implement it!!
String
that has been converted to a byte array. The fields within each record are
separated by tabs. There is also a plain text file, people.txt,
with the same data in human readable form: one record per line of tab
delimited fields.
String class has a constructor that takes a byte array as
argument, String(byte[] bytes), and a method that encodes the
string as a byte array: byte[] getBytes().
shorts from some offset within a byte
array. Make sure you handle the value -1 correctly!
package cis552;
SlottedPage.java
as an email attachment to pbergstein@umassd.edu.