public virtual void write(string str, int offset, int count){if ((offset | count) < 0 || offset > str.Length - count){throw new java.lang.StringIndexOutOfBoundsException(str, offset, count);}char[] buf = new char[count];Sharpen.StringHelper.GetCharsForString(str, offset, offset + count, buf, 0);lock (@lock){write(buf, 0, buf.Length);}}