Interface Writable

    • Method Detail

      • write

        void write​(DataOutput out)
            throws IOException
        Serialize the fields of this object to out.
        Parameters:
        out - DataOuput to serialize this object into.
        Throws:
        IOException
      • readFields

        void readFields​(DataInput in)
                 throws IOException
        Deserialize the fields of this object from in.

        For efficiency, implementations should attempt to re-use storage in the existing object where possible.

        Parameters:
        in - DataInput to deseriablize this object from.
        Throws:
        IOException
      • writeType

        void writeType​(DataOutput out)
                throws IOException
        Write the type (a single short value) to the DataOutput. See WritableFactory for details.
        Parameters:
        out - DataOutput to write to
        Throws:
        IOException - For errors during writing
      • toDouble

        double toDouble()
        Convert Writable to double. Whether this is supported depends on the specific writable.
      • toFloat

        float toFloat()
        Convert Writable to float. Whether this is supported depends on the specific writable.
      • toInt

        int toInt()
        Convert Writable to int. Whether this is supported depends on the specific writable.
      • toLong

        long toLong()
        Convert Writable to long. Whether this is supported depends on the specific writable.
      • getType

        WritableType getType()
        Get the type of the writable.
        Returns: