Interface CoordinateSortedPairInfoMap.Codec<KEY,​REC>

  • Enclosing class:
    CoordinateSortedPairInfoMap<KEY,​REC>

    public static interface CoordinateSortedPairInfoMap.Codec<KEY,​REC>
    Client must implement this class, which defines the way in which records are written to and read from file.
    • Method Detail

      • setOutputStream

        void setOutputStream​(OutputStream os)
        Where to write encoded output
        Parameters:
        os -
      • setInputStream

        void setInputStream​(InputStream is)
        Where to read encoded input from
        Parameters:
        is -
      • encode

        void encode​(KEY key,
                    REC record)
        Write object to output stream. If the key is part of the record, then there is no need to write it separately.
      • decode

        Map.Entry<KEY,​REC> decode()
        Read the next key and record from the input stream and convert into a java object.
        Returns:
        null if no more records. Should throw exception if EOF is encountered in the middle of a record.