public static PageInfo decodePageInfo(ByteChannel chan) throws IOException {
   PageInfo pi = new PageInfo();
   pi.setPageNumber(Dlugosz.readLong(chan));
   pi.setLength(Dlugosz.readLong(chan));
   pi.setByteOffset(Dlugosz.readLong(chan));
   pi.setTimeOffset(Dlugosz.readLong(chan));
   return pi;
 }
 public static int encodedPageInfoSize(PageInfo pi) {
   return Dlugosz.bytesToEncode(pi.getPageNumber())
       + Dlugosz.bytesToEncode(pi.getByteOffset())
       + Dlugosz.bytesToEncode(pi.getTimeOffset())
       + Dlugosz.bytesToEncode(pi.getLength());
 }
 public static void encodePageInfo(PageInfo pi, ByteBuffer buf) {
   Dlugosz.encode(pi.getPageNumber(), buf);
   Dlugosz.encode(pi.getLength(), buf);
   Dlugosz.encode(pi.getByteOffset(), buf);
   Dlugosz.encode(pi.getTimeOffset(), buf);
 }