protected byte[] getHeader() {
        byte[] header = new byte[MINIMUM_PAGE_SIZE + numLVs];
        header[0] = (byte)'O';
        header[1] = (byte)'g';
        header[2] = (byte)'g';
        header[3] = (byte)'S';

        header[4] = 0; // Version

        byte flags = 0;
        if(isContinue) {
            flags += 1;
        }
        if(isBOS) {
            flags += 2;
        }
        if(isEOS) {
            flags += 4;
        }
        header[5] = flags;

        IOUtils.putInt8(header, 6, granulePosition);
        IOUtils.putInt4(header, 14, sid);
        IOUtils.putInt4(header, 18, seqNum);

        // Checksum @ 22 left blank for now

        header[26] = IOUtils.fromInt(numLVs);
        System.arraycopy(lvs, 0, header, MINIMUM_PAGE_SIZE, numLVs);

        return header;
    }