DynamicMemoryWStream
- class DynamicMemoryWStream
Methods
More efficient version of read(dst, 0,
bytesWritten()
).Equivalent to
copyTo()
followed byreset()
, but may save memory use.Return the contents as
Data
, and then reset the stream.Reset, returning a reader stream with the current content.
Reimplemented in
FILEWStream
, andNullWStream
.Prepend this stream to dst, resetting this.
Called to write bytes to a
WStream
.Overloaded function.
Overloaded function.
Methods
- static DynamicMemoryWStream.SizeOfPackedUInt(value: int) int
- DynamicMemoryWStream.__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 byreset()
, 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
, andNullWStream
.
- 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
, andNullWStream
.
- 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.
writeBool(self: skia.WStream, value: bool) -> bool
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.
writeToAndReset(self: skia.DynamicMemoryWStream, dst: skia.WStream) -> bool
Equivalent to
writeToStream()
followed byreset()
, but may save memory use.writeToAndReset(self: skia.DynamicMemoryWStream, dst: skia.DynamicMemoryWStream) -> bool
Equivalent to
writeToStream()
followed byreset()
, 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