Menu

#7 Cannot detect the end of file while reading to array with x10.io.FileReader

1.0
open
None
2013-05-11
2013-05-11
Koji Ueno
No

x10.io.Reader の read(r:Rail[Byte], off:Int, len:Int) メソッドは戻り値が void になっていたが、これだと、ファイルの終端に到達した時に、終端がどこかを検出することができない。

ファイルの終端に到達した時、何バイト読んだかを返す必要があり、戻り値は Int または Long にするべきである。

Array の Long 対応が本家の方で進行中なので、ArrayがLongに対応したら、File周りで使われているIntは、Longに変更すべきなので、Longに変更したら本家にコミットする。

Discussion


Log in to post a comment.

MongoDB Logo MongoDB