FlexibleByteRingQueue.load

Restores the queue state and contents, reading from input and expecting data previously written by save() to an output stream.

Assumes that the input data do not exceed the queue capacity and throws if they do. If this is possible and you want to handle this gracefully (rather than getting an exception thrown), use the other overload of this method.

  1. size_t load(InputStream input)
    class FlexibleByteRingQueue
    size_t
    load
  2. void load(size_t delegate(void[] meta, void[] data) restore)

Parameters

input InputStream

input stream

Return Value

Type: size_t

the number of bytes read from input.

Throws

ValidationError if the input data are inconsistent or exceed the queue capacity. When throwing, the queue remains empty.

Meta