rawInput = new ByteArrayInputStream(bytes.unsafeBytes(), bytes.begin(), bytes.length());
} else {
throw recv.getRuntime().newTypeError("instance of IO needed");
}
UnmarshalStream input = new UnmarshalStream(recv.getRuntime(), rawInput, proc);
return input.unmarshalObject();
} catch (EOFException ee) {
throw recv.getRuntime().newEOFError();
} catch (IOException ioe) {
throw recv.getRuntime().newIOErrorFromException(ioe);