Class RawType

  • All Implemented Interfaces:
    PrimitiveType, State, Type

    public class RawType
    extends Object
    implements PrimitiveType, State
    This type can be used for all binary data such as images, documents, sounds etc. Note that it is NOT adequate for any kind of streams, but only for fixed-size data.
    Kai Kreuzer - Initial contribution, Laurent Garnier - add MIME type
    • Constructor Detail

      • RawType

        public RawType​(byte[] bytes,
                       String mimeType)
    • Method Detail

      • getBytes

        public byte[] getBytes()
      • getMimeType

        public String getMimeType()
      • toFullString

        public String toFullString()
        Description copied from interface: Type
        Get a string representation that contains the whole internal representation of the type.

        The returned string could be consumed by the static 'valueOf(String)' method of the respective type to build a new type that is equal to this type.

        Specified by:
        toFullString in interface Type
        a full string representation of the type to be consumed by 'valueOf(String)'
      • format

        public String format​(String pattern)
        Description copied from interface: Type
        Formats the value of this type according to a pattern (see Formatter).
        Specified by:
        format in interface Type
        pattern - the pattern to use
        the formatted string
      • hashCode

        public int hashCode()
        hashCode in class Object
      • equals

        public boolean equals​(@Nullable Object obj)
        equals in class Object