BufferDataSource
FileDataSource using an internal Data
buffer
Fields
privateMeta
Declared private (to be encrypted) metadata of the File
public let privateMeta: Data
publicMeta
Declared public metadata of the File
public let publicMeta: Data
size
Declared size of the File
public let size: Int64
hasDataLeft
Signifies that there are still bytes that have not been retrieved
public var hasDataLeft: Bool
Methods
init(buffer:privateMeta:publicMeta:size:)
public init(
buffer: Data,
privateMeta: Data,
publicMeta: Data,
size: Int64
)
Name | Type | Description |
---|---|---|
buffer | Data | |
privateMeta | Data | |
publicMeta | Data | |
size | Int64 |
getNextChunk(ofSize:)
Advances the internal buffer by chunkSize
bytes.
public mutating func getNextChunk(
ofSize chunkSize: Int64
) -> Data
Name | Type | Description |
---|---|---|
chunkSize | Int64 | amount of bytes to be retrieved |
Type | Description |
---|---|
Data | First `chunkSize` bytes of the Internal buffer |
close()
This method does nothing
public func close() throws