Class InMemoryDataRecord
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.blob.datastore.InMemoryDataRecord
-
- All Implemented Interfaces:
DataRecord
public class InMemoryDataRecord extends Object implements DataRecord
Represents binary data which is backed by a byte[] (in memory).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)DataIdentifiergetIdentifier()static InMemoryDataRecordgetInstance(String id)Convert a String to an instance of this class.longgetLastModified()longgetLength()StringgetReference()InputStreamgetStream()inthashCode()Returns zero to satisfy the Object equals/hashCode contract.static booleanisInstance(String id)Checks if String can be converted to an instance of this class.StringtoString()
-
-
-
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
-
getInstance
public static InMemoryDataRecord getInstance(String id) throws IllegalArgumentException
Convert a String to an instance of this class.- Parameters:
id- DataRecord identifier- Returns:
- the instance
- Throws:
IllegalArgumentException
-
getIdentifier
public DataIdentifier getIdentifier()
- Specified by:
getIdentifierin interfaceDataRecord
-
getReference
public String getReference()
- Specified by:
getReferencein interfaceDataRecord
-
getLength
public long getLength() throws DataStoreException- Specified by:
getLengthin interfaceDataRecord- Throws:
DataStoreException
-
getStream
public InputStream getStream()
- Specified by:
getStreamin interfaceDataRecord
-
getLastModified
public long getLastModified()
- Specified by:
getLastModifiedin interfaceDataRecord
-
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:
hashCodein classObject- Returns:
- always zero
- See Also:
Object.hashCode()
-
-