Agora Java API Reference for Android

Public Member Functions | List of all members
io.agora.mediaplayer.ContentFileReader Class Reference

## Public Member Functions
int | open (String url)
long | getFileSize ()
long | seek (long pos)
void | closeFile ()
int | read (ByteBuffer readByteBuffer)
long | getCurrentPosition ()

## Member Function Documentation

## ◆ read()

int io.agora.mediaplayer.ContentFileReader.read | ( | ByteBuffer | readByteBuffer | ) |

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