|
@@ -33,33 +33,33 @@ class NativeOutput extends Output
|
|
this.stream = stream;
|
|
this.stream = stream;
|
|
if (!stream.CanWrite) throw "Read-only stream";
|
|
if (!stream.CanWrite) throw "Read-only stream";
|
|
}
|
|
}
|
|
-
|
|
|
|
- override public function writeByte(c:Int):Void
|
|
|
|
|
|
+
|
|
|
|
+ override public function writeByte(c:Int):Void
|
|
{
|
|
{
|
|
- stream.WriteByte(c);
|
|
|
|
|
|
+ stream.WriteByte(cast c);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
override public function close():Void
|
|
override public function close():Void
|
|
{
|
|
{
|
|
stream.Close();
|
|
stream.Close();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
override public function flush():Void
|
|
override public function flush():Void
|
|
{
|
|
{
|
|
stream.Flush();
|
|
stream.Flush();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
override public function prepare(nbytes:Int):Void
|
|
override public function prepare(nbytes:Int):Void
|
|
{
|
|
{
|
|
//TODO see if implementation is correct
|
|
//TODO see if implementation is correct
|
|
stream.SetLength(haxe.Int64.add(stream.Length, cast(nbytes, Int64)));
|
|
stream.SetLength(haxe.Int64.add(stream.Length, cast(nbytes, Int64)));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
private function get_canSeek():Bool
|
|
private function get_canSeek():Bool
|
|
{
|
|
{
|
|
return stream.CanSeek;
|
|
return stream.CanSeek;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
public function seek( p : Int, pos : sys.io.FileSeek ) : Void
|
|
public function seek( p : Int, pos : sys.io.FileSeek ) : Void
|
|
{
|
|
{
|
|
var p = switch(pos)
|
|
var p = switch(pos)
|
|
@@ -68,12 +68,12 @@ class NativeOutput extends Output
|
|
case SeekCur: cs.system.io.SeekOrigin.Current;
|
|
case SeekCur: cs.system.io.SeekOrigin.Current;
|
|
case SeekEnd: cs.system.io.SeekOrigin.End;
|
|
case SeekEnd: cs.system.io.SeekOrigin.End;
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+
|
|
stream.Seek(cast(p, Int64), p);
|
|
stream.Seek(cast(p, Int64), p);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
public function tell() : Int
|
|
public function tell() : Int
|
|
{
|
|
{
|
|
return cast(stream.Position, Int);
|
|
return cast(stream.Position, Int);
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|