-
- All Implemented Interfaces:
-
com.danikula.videocache.Source
public class ByteArraySource implements Source
Simple memory based Source implementation.
-
-
Constructor Summary
Constructors Constructor Description ByteArraySource(Array<byte> data)
-
Method Summary
-
-
Constructor Detail
-
ByteArraySource
ByteArraySource(Array<byte> data)
-
-
Method Detail
-
read
int read(Array<byte> buffer)
Read data to byte buffer from source with current offset.
- Parameters:
buffer- a buffer to be used for reading data.
-
length
long length()
Returns length bytes or negative value if length is unknown.
-
open
void open(long offset)
Opens source. Source should be open before using read
- Parameters:
offset- offset in bytes for source.
-
close
void close()
Closes source and release resources. Every opened source should be closed.
-
-
-
-