Skip to content

Most visited

Recently visited

navigation

ProxyFileDescriptorCallback

public abstract class ProxyFileDescriptorCallback
extends Object

java.lang.Object
   ↳ android.os.ProxyFileDescriptorCallback


Callback that handles file system requests from ProxyFileDescriptor.

Summary

Public constructors

ProxyFileDescriptorCallback()

Public methods

void onFsync()

Processes fsync request.

long onGetSize()

Returns size of bytes provided by the file descriptor.

int onRead(long offset, int size, byte[] data)

Provides bytes read from file descriptor.

abstract void onRelease()

Invoked after the file is closed.

int onWrite(long offset, int size, byte[] data)

Handles bytes written to file descriptor.

Inherited methods

From class java.lang.Object

Public constructors

ProxyFileDescriptorCallback

ProxyFileDescriptorCallback ()

Public methods

onFsync

void onFsync ()

Processes fsync request.

Throws
ErrnoException

onGetSize

long onGetSize ()

Returns size of bytes provided by the file descriptor.

Returns
long Size of bytes
Throws
ErrnoException

onRead

int onRead (long offset, 
                int size, 
                byte[] data)

Provides bytes read from file descriptor. It needs to return exact requested size of bytes unless it reaches file end.

Parameters
offset long: Where to read bytes from.
size int: Size for read bytes.
data byte: Byte array to store read bytes.
Returns
int Size of bytes returned by the function.
Throws
ErrnoException

onRelease

void onRelease ()

Invoked after the file is closed.

onWrite

int onWrite (long offset, 
                int size, 
                byte[] data)

Handles bytes written to file descriptor.

Parameters
offset long: Where to write bytes to.
size int: Size for write bytes.
data byte: Byte array to be written to somewhere.
Returns
int Size of bytes processed by the function.
Throws
ErrnoException
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.