code: public void writeToStream(OutputStream out, byte[] writeBuffer) throws IOException {
      if (baseObject instanceof byte[]) {
        int offsetInByteArray = (int) (baseOffset - Platform.BYTE_ARRAY_OFFSET);
        out.write((byte[]) baseObject, offsetInByteArray, sizeInBytes);
      }
docs: Write this UnsafeRow's underlying bytes to the given OutputStream.
  
  @param out the stream to write to.
  @param writeBuffer a byte array for buffering chunks of off-heap data while writing to the
  output stream. If this row is backed by an on-heap byte array, then this
  buffer will not be used and may be null.