public static Object sliceOnto(JSObject src, JSObject dest, int start, int end) {
ByteBuf srcBuf = ((NettyExternalIndexedData)src.getExternalIndexedData()).buffer();
int len = end - start;
ByteBuf destBuf = srcBuf.slice( start, len );
destBuf.writerIndex(0);
dest.setExternalIndexedData(new NettyExternalIndexedData(destBuf));
return src;
}