Alachisoft.NCache.Common.DataStructures.IStreamItem Maven / Gradle / Ivy
package Alachisoft.NCache.Common.DataStructures;
/**
* To be implemented by binary data structures.
*/
public interface IStreamItem {
/**
* Copies the data from stream item into the Virtual buffer.
*
* @param offset offset in the stream item.
* @param length length of the data to be read.
* @return
*/
VirtualArray Read(int offset, int length);
/**
* Copies data from the virutal buffer into the stream item.
*
* @param vBuffer Data to be written to the stream item.
* @param srcOffset Offset in the source buffer.
* @param dstOffset Offset in the stream item.
* @param length Length of data to be copied.
*/
void Write(VirtualArray vBuffer, int srcOffset, int dstOffset, int length);
/**
* Gets/Sets the length of stram item.
*/
int getLength();
void setLength(int value);
}