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 boolean
equals(Object obj)
DataIdentifier
getIdentifier()
static InMemoryDataRecord
getInstance(String id)
Convert a String to an instance of this class.long
getLastModified()
long
getLength()
String
getReference()
InputStream
getStream()
int
hashCode()
Returns zero to satisfy the Object equals/hashCode contract.static boolean
isInstance(String id)
Checks if String can be converted to an instance of this class.String
toString()
-
-
-
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:
getIdentifier
in interfaceDataRecord
-
getReference
public String getReference()
- Specified by:
getReference
in interfaceDataRecord
-
getLength
public long getLength() throws DataStoreException
- Specified by:
getLength
in interfaceDataRecord
- Throws:
DataStoreException
-
getStream
public InputStream getStream()
- Specified by:
getStream
in interfaceDataRecord
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in 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:
hashCode
in classObject
- Returns:
- always zero
- See Also:
Object.hashCode()
-
-