@Override
 public final void writeBoolean(boolean v) {
   try {
     bitPackingWriter.write(v ? 1 : 0);
   } catch (IOException e) {
     throw new ParquetEncodingException("could not write boolean", e);
   }
 }
 @Override
 public BytesInput getBytes() {
   try {
     bitPackingWriter.finish();
   } catch (IOException e) {
     throw new ParquetEncodingException("could not write page", e);
   }
   if (Log.DEBUG) LOG.debug("writing a buffer of size " + out.size());
   return BytesInput.from(out);
 }