c2pa_io_web library

Browser Blob-backed input for the platform-neutral C2PA byte I/O APIs.

Classes

BlobByteSource
A browser Blob-backed random-access byte source.
BoundedByteReader
A sequential reader constrained to a fixed range of a byte source.
ByteRange
A half-open byte range, [start, end).
MemoryByteSink
An in-memory byte sink useful for tests and generated byte buffers.
MemoryByteSource
A fixed random-access byte source backed by an isolated in-memory copy.
PatchableByteSink
A writable byte sink that can replace bytes already written.
RandomAccessByteSource
An asynchronously readable, fixed-length random-access byte source.
WritableByteSink
An asynchronously writable byte destination with append-only semantics.

Functions

complementByteRanges(ByteRange container, Iterable<ByteRange> excluded) → List<ByteRange>
Returns portions of container not covered by excluded.
copyByteRange(RandomAccessByteSource source, WritableByteSink sink, ByteRange range, {int chunkSize = 64 * 1024}) → Future<void>
Copies range from source to sink without closing sink.
mergeByteRanges(Iterable<ByteRange> ranges) → List<ByteRange>
Sorts ranges and merges overlapping or adjacent non-empty ranges.

Exceptions / Errors

ByteIoException
Base class for failures reported by byte source and sink abstractions.
ByteRangeOutOfBoundsException
A requested byte range was outside the available container range.
ByteRangeOverflowException
A byte range calculation exceeded the supported coordinate limit.
ByteSinkClosedException
An operation attempted to write to or close an already closed byte sink.
ByteSinkIoException
An underlying byte sink I/O operation failed.
ByteSourceChangedException
A byte source's length changed after it was opened.
ByteSourceClosedException
An operation attempted to read from an already closed byte source.
ByteSourceIoException
An underlying byte source I/O operation failed.
InvalidByteRangeException
An invalid half-open byte range or coordinate.
TruncatedReadException
A read returned fewer bytes than the requested range length.