Class ByteSizeValue

    • Constructor Detail

      • ByteSizeValue

        public ByteSizeValue​(StreamInput in)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • ByteSizeValue

        public ByteSizeValue​(long bytes)
      • ByteSizeValue

        public ByteSizeValue​(long size,
                             ByteSizeUnit unit)
    • Method Detail

      • bytesAsInt

        @Deprecated
        public int bytesAsInt()
        Deprecated.
      • getBytes

        public long getBytes()
      • getKb

        public long getKb()
      • getMb

        public long getMb()
      • getGb

        public long getGb()
      • getTb

        public long getTb()
      • getPb

        public long getPb()
      • getKbFrac

        public double getKbFrac()
      • getMbFrac

        public double getMbFrac()
      • getGbFrac

        public double getGbFrac()
      • getTbFrac

        public double getTbFrac()
      • getPbFrac

        public double getPbFrac()
      • getStringRep

        public java.lang.String getStringRep()
        Returns:
        a string representation of this value which is guaranteed to be able to be parsed using parseBytesSizeValue(String, ByteSizeValue, String). Unlike toString() this method will not output fractional or rounded values so this method should be preferred when serialising the value to JSON.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(ByteSizeValue other)
        Specified by:
        compareTo in interface java.lang.Comparable<ByteSizeValue>