Class BinaryResourceValue

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  BinaryResourceValue.Type
      Resource type codes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SIZE
      The serialized size in bytes of a BinaryResourceValue.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static BinaryResourceValue create​(java.nio.ByteBuffer buffer)  
      int data()
      The actual 4-byte value; interpretation of the value depends on dataType.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      int size()
      The length in bytes of this value.
      byte[] toByteArray()
      Converts this resource into an array of bytes representation.
      byte[] toByteArray​(boolean shrink)
      Converts this resource into an array of bytes representation.
      BinaryResourceValue.Type type()
      The raw data type of this value.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • size

        public int size()
        The length in bytes of this value.
      • data

        public int data()
        The actual 4-byte value; interpretation of the value depends on dataType.
      • toByteArray

        public byte[] toByteArray()
        Description copied from interface: SerializableResource
        Converts this resource into an array of bytes representation.
        Specified by:
        toByteArray in interface SerializableResource
        Returns:
        An array of bytes representing this resource.
      • toByteArray

        public byte[] toByteArray​(boolean shrink)
        Description copied from interface: SerializableResource
        Converts this resource into an array of bytes representation.
        Specified by:
        toByteArray in interface SerializableResource
        Parameters:
        shrink - True if, when converting to a byte array, this resource can modify the returned bytes in an effort to reduce the size.
        Returns:
        An array of bytes representing this resource.
      • 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