docs: protected void writeByteArray(ObjectOutput output, byte[] data) throws IOException {
          if (null == data || 0 == data.length) {
              output.writeInt(-1);
          } else {
              output.writeInt(data.length);
              output.write(data);
          }
      }