PrivMX DOCS
API Reference/PrivMX Endpoint Java Extra/Store

StoreFileStream

Base class for Store file streams. Implements progress listeners.

Constructors

StoreFileStream

Creates instance of StoreFileStream.

Params

handle

Long

handle to Store file

storeApi

StoreApi

StoreApi instance that calls read/write methods on files

protected void StoreFileStream(
Long handle,
StoreApi storeApi
)

Fields

OPTIMAL_SEND_SIZE

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

handle

Long Reference to file handle.

storeApi

StoreApi Reference to StoreApi.

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 String close()

Returns

String · ID of the closed file

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.