PrivMX DOCS
API Reference/PrivMX Endpoint Java Extra/Inbox

InboxFileStream

Base class for Inbox file streams.

Constructors

InboxFileStream

Creates instance of InboxFileStream.

Params

handle

Long

handle to Inbox file

inboxApi

InboxApi

InboxApi instance that calls read/write methods on files

protected void InboxFileStream(
Long handle,
InboxApi inboxApi
)

Fields

OPTIMAL_SEND_SIZE

long Constant value with optimal size of reading/sending data.

handle

Long Reference to file handle.

inboxApi

InboxApi Reference to InboxApi instance.

Methods

callChunkProcessed

Increases the size of current sent/read data by chunkSize and calls ProgressListener#onChunkProcessed(Long).

Params

chunkSize

Long

size of processed chunk

protected void callChunkProcessed(
Long chunkSize
)

close

Closes file handle.

public synchronized String close()

Returns

String · ID of the closed file

getFileHandle

Gets current file handle.

public Long getFileHandle()

Returns

Long · file handle.

getProcessedBytes

Gets size of sent data.

public Long getProcessedBytes()

Returns

Long · size of sent data.

isClosed

Returns information whether the instance is closed.

public Boolean isClosed()

Returns

Boolean · true if file handle is closed

setProgressListener

Sets listening for single chunk sent/read.

Params

progressListener

ProgressListener

callback triggered when chunk is sent/read

public void setProgressListener(
ProgressListener progressListener
)

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.

PrivMX Endpoint Java v2.3

This package is not up to date with the core documentation. Some of the features you've seen described in other parts of the documentation might not be mentioned here. Those changes do not influence compatibility, however