Class InMemoryDataRecord

  • All Implemented Interfaces:
    DataRecord

    public class InMemoryDataRecord
    extends java.lang.Object
    implements DataRecord
    Represents binary data which is backed by a byte[] (in memory).
    • Method Detail

      • isInstance

        public static boolean isInstance​(java.lang.String id)
        Checks if String can be converted to an instance of this class.
        Parameters:
        id - DataRecord identifier
        Returns:
        true if it can be converted
      • getInstance

        public static InMemoryDataRecord getInstance​(java.lang.String id)
                                              throws java.lang.IllegalArgumentException
        Convert a String to an instance of this class.
        Parameters:
        id - DataRecord identifier
        Returns:
        the instance
        Throws:
        java.lang.IllegalArgumentException
      • getStream

        public java.io.InputStream getStream()
        Specified by:
        getStream in interface DataRecord
      • toString

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

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

        public int hashCode()
        Returns zero to satisfy the Object equals/hashCode contract. This class is mutable and not meant to be used as a hash key.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        always zero
        See Also:
        Object.hashCode()