DynamicMemoryWStream

class DynamicMemoryWStream

Methods

SizeOfPackedUInt

__init__

__init__(self: skia.DynamicMemoryWStream) -> None

bytesWritten

copyTo

More efficient version of read(dst, 0, bytesWritten()).

copyToAndReset

Equivalent to copyTo() followed by reset(), but may save memory use.

detachAsData

Return the contents as Data, and then reset the stream.

detachAsStream

Reset, returning a reader stream with the current content.

flush

Reimplemented in FILEWStream, and NullWStream.

newline

padToAlign4

prependToAndReset

Prepend this stream to dst, resetting this.

read

reset

write

Called to write bytes to a WStream.

write16

write32

write8

writeBigDecAsText

writeBool

Overloaded function.

writeDecAsText

writeHexAsText

writePackedUInt

writeScalar

writeScalarAsText

writeStream

writeText

writeToAndReset

Overloaded function.

writeToStream

Methods

static DynamicMemoryWStream.SizeOfPackedUInt(value: int) int
DynamicMemoryWStream.__init__(self: skia.DynamicMemoryWStream) None

__init__(self: skia.DynamicMemoryWStream) -> None

DynamicMemoryWStream.bytesWritten(self: skia.WStream) int
DynamicMemoryWStream.copyTo(self: skia.DynamicMemoryWStream, dst: buffer) None

More efficient version of read(dst, 0, bytesWritten()).

DynamicMemoryWStream.copyToAndReset(self: skia.DynamicMemoryWStream, dst: buffer) None

Equivalent to copyTo() followed by reset(), but may save memory use.

DynamicMemoryWStream.detachAsData(self: skia.DynamicMemoryWStream) skia.Data

Return the contents as Data, and then reset the stream.

DynamicMemoryWStream.detachAsStream(self: skia.DynamicMemoryWStream) skia.StreamAsset

Reset, returning a reader stream with the current content.

DynamicMemoryWStream.flush(self: skia.WStream) None

Reimplemented in FILEWStream, and NullWStream.

DynamicMemoryWStream.newline(self: skia.WStream) bool
DynamicMemoryWStream.padToAlign4(self: skia.DynamicMemoryWStream) None
DynamicMemoryWStream.prependToAndReset(self: skia.DynamicMemoryWStream, dst: skia.DynamicMemoryWStream) None

Prepend this stream to dst, resetting this.

DynamicMemoryWStream.read(self: skia.DynamicMemoryWStream, data: buffer, offset: int = 0) bool
DynamicMemoryWStream.reset(self: skia.DynamicMemoryWStream) None
DynamicMemoryWStream.write(self: skia.WStream, buffer: buffer) bool

Called to write bytes to a WStream.

Returns true on success

Parameters
  • buffer – the address of at least size bytes to be written to the stream

  • size – The number of bytes in buffer to write to the stream

Returns

true on success

Implemented in DynamicMemoryWStream,

FILEWStream, and NullWStream.

DynamicMemoryWStream.write16(self: skia.WStream, value: int) bool
DynamicMemoryWStream.write32(self: skia.WStream, value: int) bool
DynamicMemoryWStream.write8(self: skia.WStream, value: int) bool
DynamicMemoryWStream.writeBigDecAsText(self: skia.WStream, value: int, minDigits: int = 0) bool
DynamicMemoryWStream.writeBool(*args, **kwargs)

Overloaded function.

  1. writeBool(self: skia.WStream, value: bool) -> bool

  2. writeBool(self: skia.WStream, value: bool) -> bool

DynamicMemoryWStream.writeDecAsText(self: skia.WStream, value: int) bool
DynamicMemoryWStream.writeHexAsText(self: skia.WStream, value: int, minDigits: int = 0) bool
DynamicMemoryWStream.writePackedUInt(self: skia.WStream, value: int) bool
DynamicMemoryWStream.writeScalar(self: skia.WStream, value: float) bool
DynamicMemoryWStream.writeScalarAsText(self: skia.WStream, value: float) bool
DynamicMemoryWStream.writeStream(self: skia.WStream, input: skia.Stream, length: int) bool
DynamicMemoryWStream.writeText(self: skia.WStream, text: str) bool
DynamicMemoryWStream.writeToAndReset(*args, **kwargs)

Overloaded function.

  1. writeToAndReset(self: skia.DynamicMemoryWStream, dst: skia.WStream) -> bool

    Equivalent to writeToStream() followed by reset(), but may save memory use.

  2. writeToAndReset(self: skia.DynamicMemoryWStream, dst: skia.DynamicMemoryWStream) -> bool

    Equivalent to writeToStream() followed by reset(), but may save memory use.

    When the dst is also a DynamicMemoryWStream, the implementation is constant time.

DynamicMemoryWStream.writeToStream(self: skia.DynamicMemoryWStream, dst: skia.WStream) bool