}
protected int write(CallSite write, ByteBuffer src) throws IOException {
ByteList buffer = new ByteList(src.array(), src.position(), src.remaining(), false);
IRubyObject written = write.call(io.getRuntime().getCurrentContext(), io, io, RubyString.newStringLight(io.getRuntime(), buffer));
return (int)written.convertToInteger().getLongValue();
}
protected CallSite initReadSite() {
if(io.respondsTo("read")) {
return MethodIndex.getFunctionalCallSite("read");