try {
boolean bufferString = str instanceof RubyString;
ByteList[] strPtr = {bufferString ? ((RubyString) str).getByteList() : null};
int[] limit_p = {_limit};
while ((c = fptr.appendline(context, newline, strPtr, limit_p)) != OpenFile.EOF) {
int s, p, pp, e;
if (c == newline) {
if (strPtr[0].getRealSize() < rslen) continue;
s = strPtr[0].getBegin();