code: @Override
      public void writeArray(Object array) {
          Class<?> componentType = array.getClass().getComponentType();
          if (componentType.equals(Character.TYPE)) {
              // write the char[] as a string
              writeString(new String((char[]) array));
          }
          else if (componentType.equals(Byte.TYPE)) {
              writePrimitiveByteArray((byte[]) array);
          }
          else {
              writePrimitiveArrayFallback(array);
          }
      }
docs: {@inheritDoc}