buf.asCharBuffer().put( chars, offset, chars.length - offset );
buf.limit( chars.length * 2 );
int count = fileChannel.write( buf, mappedStartPosition );
if ( count != bytesToWrite )
{
throw new UnderlyingStorageException( "Failed to write from " +
offset + " expected " + bytesToWrite + " but wrote " +
count );
}
mappedStartPosition += bytesToWrite;
return;