package MemoryFile @ISA = qw() sub new my ($module, $buff) = @_; return $this; sub DESTROY my $this = shift; sub Initialize my ($this) = @_; sub SetSourceCharCode my ($this, $c) = @_; return $this->{SoruceCharCode} = $c; sub SourceCharCode return shift->{SoruceCharCode}; sub CharCode my ($this) = @_; return $this->{'CharCode'}; sub SetBuffer sub SetBuffer { my ($this,$s)= sub Buffer return shift->{Buffer}; sub Open my ($this, $buff) = @_; return $this->{Buffer} = $buff; sub ReadFromFile my ($this, $path) = @_; return $this->{Buffer} = $s; sub Close my ($this) = @_; sub SetSourceCharCode my ($this, $c) = @_; return $this->{SoruceCharCode} = $c; sub SourceCharCode return shift->{SoruceCharCode}; sub read my ($this, $s, $len, $offset) = @_; return $_[1] = substr($this->{Buffer}, $offset, $len); sub sysread my ($this, $s, $len, $offset) = @_; return $this->read($s, $len, $offset); sub syswrite my ($this, $s, $len, $offset) = @_; sub getc my ($this) = @_; return $c; sub truncate my ($this, $length) = @_; return $this->{Buffer} = substr($this->{Buffer}, 0, $length); sub eof my ($this) = @_; return 1 if($len <= $this->{Pos}); return 0; sub ReadLine my ($this) = @_; return $l; sub PreReadLine my ($this) = @_; return $l; sub Write my ($this, $str) = @_; sub print my ($this, @args) = @_; sub printf my ($this, @args) = @_; sub SkipTo my ($this, $pattern, $origin) = @_; return undef unless($IsFound); return $line; sub tell my ($this) = @_; return $this->{Pos}; sub rewind return shift->seek(0,0); sub seek my ($this, $pos, $origin) = @_; return $this->{Pos} = $pos;