Adding needed native methods for ScannerTest.

I'll need to go back and robustify copyMemory at some point.