Class InMemoryDataRecord

  • All Implemented Interfaces:
    DataRecord

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

      • isInstance

        public static boolean isInstance​(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
      • getReference

        public String getReference()
        Description copied from interface: DataRecord
        Returns a secure reference to this binary, or null if no such reference is available.
        Specified by:
        getReference in interface DataRecord
        Returns:
        binary reference, or null
      • getStream

        public InputStream getStream()
        Description copied from interface: DataRecord
        Returns the the binary stream in this record.
        Specified by:
        getStream in interface DataRecord
        Returns:
        binary stream
      • getLastModified

        public long getLastModified()
        Description copied from interface: DataRecord
        Returns the last modified of the record.
        Specified by:
        getLastModified in interface DataRecord
        Returns:
        last modified time of the binary stream
      • 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 Object
        Returns:
        always zero
        See Also:
        Object.hashCode()