|
@@ -37,17 +37,17 @@ import java.io.EOFException;
|
|
|
|
|
|
override public function readByte():Int
|
|
|
{
|
|
|
+ var ret = 0;
|
|
|
try
|
|
|
{
|
|
|
- return stream.read();
|
|
|
- }
|
|
|
- catch (e:EOFException) {
|
|
|
- throw new Eof();
|
|
|
+ ret = stream.read();
|
|
|
}
|
|
|
-
|
|
|
catch (e:IOException) {
|
|
|
throw haxe.io.Error.Custom(e);
|
|
|
}
|
|
|
+ if ( ret == -1 )
|
|
|
+ throw new Eof();
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
override public function readBytes(s:Bytes, pos:Int, len:Int):Int
|