NearShareFileProvider Interface

public interface NearShareFileProvider

Interface implemented by apps to provide information about a file to be shared and create a NearShareStream for this data. The NearShareHelper class can be used to create the default implementation of this interface.

Method Summary

Modifier and Type Method and Description
String getFileName()

Gets the name of the file to be shared.

long getSize()

Gets the size in bytes of the file to be shared.

NearShareStream open()

Opens a stream to the file so that it can be shared.

Method Details

getFileName

public String getFileName()

Gets the name of the file to be shared.

Returns:

The name of the file.

getSize

public long getSize()

Gets the size in bytes of the file to be shared.

Returns:

The file size in bytes.

open

public NearShareStream open()

Opens a stream to the file so that it can be shared.

Returns:

A **NearShareStream** instance representing the data.

Throws:

IOException

Applies to