Package io.agora.mediaplayer
Class AssetsFileReader
java.lang.Object
io.agora.mediaplayer.AssetsFileReader
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckAssetExists(String assetFilePath) Check if the assets file exists without actually opening it for readingvoidlonglongintintread(ByteBuffer readByteBuffer) Read file content to ByteBufferlongseek(long pos)
-
Field Details
-
PREFIX_ASSETS
- See Also:
-
-
Constructor Details
-
AssetsFileReader
public AssetsFileReader()
-
-
Method Details
-
checkAssetExists
Check if the assets file exists without actually opening it for reading- Parameters:
assetFilePath- The asset file path with PREFIX_ASSETS prefix- Returns:
- true if the file exists, false otherwise
-
open
-
getFileSize
public long getFileSize() -
seek
public long seek(long pos) -
closeFile
public void closeFile() -
read
Read file content to ByteBuffer- Parameters:
readByteBuffer- The 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
-
getCurrentPosition
public long getCurrentPosition()
-