private void writeArray(Vector array) throws IOException {
        output.write(BEGIN_ARRAY);
        final int size = array.size();
        for(int i = 0; i < size; i++) {
            writeValue(array.get(i));
            if (i < (size-1))
                output.write(SPACE);
        }
        output.write(END_ARRAY);
    }