Class ReductionCheckedDataWriter<C>

    • Constructor Detail

      • ReductionCheckedDataWriter

        public ReductionCheckedDataWriter​(DataOutput output,
                                          C extractor,
                                          BooleanSupplier existsSupplier)
    • Method Detail

      • write

        public void write()
                   throws IOException
        Write a piece of data, retrieved from the extractor, to the output stream.
        First writes whether the data exists, then if it does exists writes the data.
        Specified by:
        write in class ReductionDataWriter<C>
        Throws:
        IOException - if an exception occurs while writing to the output stream
      • checkedWrite

        protected abstract void checkedWrite()
                                      throws IOException
        Write a piece of data, retrieved from the extractor, to the output stream.
        The data being written is guaranteed to exist.
        Throws:
        IOException - if an exception occurs while writing to the output stream