code: public MessagePacker packArrayHeader(int arraySize)
              throws IOException
      {
          if (arraySize < 0) {
              throw new IllegalArgumentException("array size must be >= 0");
          }
  
          if (arraySize < (1 << 4)) {
              writeByte((byte) (FIXARRAY_PREFIX | arraySize));
          }
          else if (arraySize < (1 << 16)) {
              writeByteAndShort(ARRAY16, (short) arraySize);
          }
          else {
              writeByteAndInt(ARRAY32, arraySize);
          }
          return this;
      }
docs: Writes header of an Array value.
  <p>
  You will call other packer methods for each element after this method call.
  <p>
  You don't have to call anything at the end of iteration.
  
  @param arraySize number of elements to be written
  @return this
  @throws IOException when underlying output throws IOException