Agora Java API Reference for Android
Public Member Functions | Static Public Attributes | List of all members
io.agora.mediaplayer.AssetsFileReader Class Reference

Public Member Functions

int open (String assetFilePath)
 
long getFileSize ()
 
long seek (long pos)
 
void closeFile ()
 
int read (ByteBuffer readByteBuffer)
 
long getCurrentPosition ()
 

Static Public Attributes

static final String PREFIX_ASSETS = "/assets/"
 

Member Function Documentation

◆ read()

int io.agora.mediaplayer.AssetsFileReader.read ( ByteBuffer  readByteBuffer)

Read file content to ByteBuffer

Parameters
readByteBufferThe buffer into which bytes are to be transferred
Returns
The number of bytes read, possibly zero, or -1 if the channel has reached end-of-stream, or -2 if other errors