Changed write function to use jShortArray instead of short pointer