Interface IChunkSupplier
-
public interface IChunkSupplier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Chunk
getNextChunk(byte[] reusableBuffer)
Get the input for the next chunk.
-
-
-
Method Detail
-
getNextChunk
Chunk getNextChunk(byte[] reusableBuffer) throws CouldNotLoadRecordingException, java.io.IOException
Get the input for the next chunk. This should check that the input data begins with the correct magic byte sequence.Note that the actual reading of the complete chunk data is handled by the
Chunk
object together with the correctIChunkLoader
. The chunk loader must be allowed to complete the data reading from the supplier input before this method may be called again, otherwise the input will not be at the correct position.- Parameters:
reusableBuffer
- A byte array to be used for storing chunk data. While the returned chunk object is used for loading events, this byte array must not be written to by anyone except the chunk object.- Returns:
- An input for the next chunk, or null if there are no more chunks. If an input is returned, it must be read to the end of the chunk before requesting another chunk.
- Throws:
CouldNotLoadRecordingException
java.io.IOException
-
-