Yukihiro Matsumoto
1/29/2009 5:51:00 PM
Hi,
In message "Re: Errno::ENOMEM reading a device in Ruby, not in Java though"
on Thu, 29 Jan 2009 14:47:11 +0900, Heesob Park <phasis@gmail.com> writes:
|The another difference between ruby and java is read buffer size.
|Ruby's buffer size is 4096 and java's buffer size is 65536.
|
|The man page of st says:
|
|RETURN VALUE
|
| ENOMEM The byte count in read() is smaller than the next physi-
| cal block on the tape. (Before 2.2.18 and 2.4.0-test6 the
| extra bytes have been silently ignored.)
I didn't know that. In that case, you have to pre-allocate reading
buffer (string) and specify it to read method.
matz.