﻿class System.IO.Stream
	java service Stream
	js service Stream
	python service Stream
	php resource
	rust service IStream

property get bool CanRead
	java {!}.canRead()
	python {!}.readable
	js {!}.canRead()
property get bool CanWrite
	java {!}.canWrite()
	python {!}.writable
	js {!}.canWrite()
property get bool CanSeek
	java {!}.canSeek()
	python {!}.seekable
	js {!}.canSeek()

property get long Position modify throws IOException
	java {!}.getPosition()
	js {!}.position
	python {!}.position
	php ftell({!})
	rust {!}.get_position() 
property set long Position modify throws IOException
	java {!}.setPosition({0})
	js {!}.position = {0}
	python {!}.position = {0}
	php fseek({!}, {0}, SEEK_SET)
	rust {!}.set_position({0}) 

property get long Length modify throws IOException
	java {!}.length()
	js {!}.length
	python {!}.length
	php Utils::GetLengthStream({!})
	rust {!}.len()
method void SetLength(long) modify throws IOException
	java =setLength
	js =setLength
	python {!}.length = {0}
	php ftruncate({!}, {0})
	rust {!}.set_len({0})

method void Dispose() modify throws IOException
	java =close
	js =close
	python =close
	php fclose({!})
	rust =close
method void Close() modify throws IOException
	java =close
	js =close
	python =close
	php fclose({!})
	rust =close
method void Flush() modify throws IOException
	java =flush
	js =flush
	python =flush
	php fflush({!})
	rust =flush

method int ReadByte() modify throws IOException
	java =read
	js =readByte
	python =readbyte
	php Utils::ReadByteStream({!})
	rust =read_byte
method int Read(byte[], int, int) modify throws IOException
	java =read
	js =read
	python =read
	php Utils.ReadStream({!}, {0}, {1}, {2})
	rust {!}.read({0&mut}, {1}, {2})

method void WriteByte(byte) modify throws IOException 
	java =write
	js =writeByte
	python =writebyte
	php Utils::WriteByteStream({!}, {0})
	rust =write_byte
method int Write(byte[], int, int) modify throws IOException 
	java =write
	js =write
	python =write
	php Utils::WriteStream({!}, {0}, {1}, {2})
	rust {!}.write({0&}, {1}, {2})

method long Seek(long, SeekOrigin) modify throws IOException
	java =seek
	js =seek
	python =seek
	php fseek({!}, {0}, {1})
	rust =seek
