}
return runtime.newFixnum(stream.read(buffer));
} catch (InvalidValueException ex) {
throw runtime.newErrnoEINVALError();
} catch (EOFException e) {
return runtime.newFixnum(-1);
} catch (BadDescriptorException e) {
throw runtime.newErrnoEBADFError();
} catch (IOException e) {