public static long asciiWrite(JSObject object, String str, int offset, int len) {
ByteBuf b = extract( object );
int origWriter = b.writerIndex();
byte[] bytes = str.getBytes( ASCII );
len = Math.min( bytes.length, Math.min( len, b.writableBytes() ) );
b.writeBytes( bytes, 0, len );
b.writerIndex( Math.max( b.writerIndex(), origWriter ) );
return len;
}
public static String asciiSlice(JSObject object, int start, int end) {