Difference between revisions of "Lua:Class:Stream"

From Cheat Engine
Jump to navigation Jump to search
(Replaced content with '<span style="font-size:25px;color:red">Sorry! Content not available.</span>')
Line 1: Line 1:
−
[[Category:Lua]]
+
<span style="font-size:25px;color:red">Sorry! Content not available.</span>
−
Stream '''class''': ('''Inheritance''': ''[[Object]]'')
 
−
 
 
−
Base class for byte stream objects.
 
−
 
 
−
== Properties ==
 
−
; Size &#58; integer
 
−
: The byte size of the stream.
 
−
 
 
−
; Position &#58; integer
 
−
: The current byte position of the stream.
 
−
 
 
−
== Methods ==
 
−
 
 
−
; copyFrom(''stream'', ''count'')
 
−
: Copies 'count' number of bytes from the given 'stream' to this stream
 
−
: Note: Always set 'Postion' before using 'copyFrom' (i.e.: 0 for start of steam).
 
−
 
 
−
:'''Example''':
 
−
local stringStream = createStringStream()
 
−
stringStream.Position = 0 -- if not set before using 'copyFrom' the 'StringStream' object will be inconsistent.
 
−
stringStream.copyFrom(tableFile.Stream, tableFile.Stream.Size)
 
−
 
 
−
; read(''count'') &#58; table
 
−
: Returns a byte table containing the bytes of the stream.
 
−
: This increases the position.
 
−
 
 
−
; write(''byteTable'', ''count'' OPTIONAL)
 
−
: Writes the given bytetable to the stream
 
−
 
 
−
== See also ==
 
−
* [[Lua]]
 
−
* [[Help_File:Script engine|Script engine]]
 
−
 
 
−
=== Related Functions ===
 
−
* [[createMemoryStream]]
 
−
* [[createFileStream]]
 
−
* [[createStringStream]]
 
−
 
 
−
=== Related Classes ===
 
−
* [[MemoryStream]]
 
−
* [[FileStream]]
 
−
* [[StringStream]]
 

Revision as of 16:01, 16 March 2019

Sorry! Content not available.