public static void writeByteArray(byte[] array, DataOutput out) throws IOException {
    int len = 0;
    if (array != null) {
      len = array.length;
    }
    writeByteArray(array, len, out);
  }
Writes an array of <code>byte</code>s to a <code>DataOutput</code>. This method will serialize
a <code>null</code> array and not throw a <code>NullPointerException</code>.

@param array the array of {@code byte}s to write
@param out the {@link DataOutput} to write to

@throws IOException A problem occurs while writing to <code>out</code>

@see #readByteArray
geode-core/src/main/java/org/apache/geode/DataSerializer.java