public class IData
extends java.lang.Object
Constructor and Description |
---|
IData(net.maidsafe.api.AppHandle appHandle)
Initialises a new instance of the IData class
|
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<byte[]> |
close(NativeHandle writerHandle,
NativeHandle cipherOptHandle)
Closes the self encryptor and write the Immutable Data to the network
|
java.util.concurrent.CompletableFuture<NativeHandle> |
getReader(byte[] address)
Get self encryptor reader for existent data on the network
|
java.util.concurrent.CompletableFuture<java.lang.Long> |
getSerialisedSize(byte[] address)
Deprecated.
This method will be removed
|
java.util.concurrent.CompletableFuture<java.lang.Long> |
getSize(NativeHandle readerHandle)
Get the data size from the self encryptor
|
java.util.concurrent.CompletableFuture<NativeHandle> |
getWriter()
Initialises a new self encryptor writer handle
|
java.util.concurrent.CompletableFuture<byte[]> |
read(NativeHandle readerHandle,
long position,
long length)
Read data from the self encryptor
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
write(NativeHandle writerHandle,
byte[] data)
Write data to the self encryptor.
|
public IData(net.maidsafe.api.AppHandle appHandle)
appHandle
- App handlepublic java.util.concurrent.CompletableFuture<NativeHandle> getWriter()
NativeHandle
instancepublic java.util.concurrent.CompletableFuture<java.lang.Void> write(NativeHandle writerHandle, byte[] data)
writerHandle
- Self encryptor handle as NativeHandle
data
- Data to be self encryptedpublic java.util.concurrent.CompletableFuture<byte[]> close(NativeHandle writerHandle, NativeHandle cipherOptHandle)
writerHandle
- Self encryptor handle as NativeHandle
cipherOptHandle
- Cipher options as NativeHandle
public java.util.concurrent.CompletableFuture<NativeHandle> getReader(byte[] address)
address
- Address of the data as byte arrayNativeHandle
public java.util.concurrent.CompletableFuture<byte[]> read(NativeHandle readerHandle, long position, long length)
readerHandle
- Self encryptor reader as NativeHandle
position
- Position from which data is to be readlength
- Length of the data to be readpublic java.util.concurrent.CompletableFuture<java.lang.Long> getSize(NativeHandle readerHandle)
readerHandle
- Self encryptor reader as NativeHandle
@Deprecated public java.util.concurrent.CompletableFuture<java.lang.Long> getSerialisedSize(byte[] address)
address
- Address of the Immutable Data