- All Known Implementing Classes:
SimpleChunkMetadata
public interface ChunkMetadata
Interface representing metadata of a chunk as created by a
Chunker.
Unlike a Chunk, metadata does not own their data.
- Author:
- Daniel Tischner <zabuza.dev@gmail.com>
-
Method Summary
Modifier and Type Method Description byte[]getHash()A binary hash representation of the contained data.java.lang.StringgetHexHash()A hexadecimal hash representation of the contained data.intgetLength()The length of this chunk, i.e. the amount of contained data.longgetOffset()Gets the offset of this chunk, with respect to its source data stream.
-
Method Details
-
getHash
byte[] getHash()A binary hash representation of the contained data. Using the algorithm specified during construction by theChunker.- Returns:
- A binary hash representation
-
getHexHash
java.lang.String getHexHash()A hexadecimal hash representation of the contained data. Using the algorithm specified during construction by theChunker.- Returns:
- A hexadecimal hash representation
-
getLength
int getLength()The length of this chunk, i.e. the amount of contained data.- Returns:
- Gets the length
-
getOffset
long getOffset()Gets the offset of this chunk, with respect to its source data stream.- Returns:
- The offset
-