public void writeObject(DataOutputStream out) throws IOException {
        out.writeInt(EYECATCODE);
        out.writeInt(flowVersion);
        out.writeInt(flowType);
        out.writeInt(messageId);
        out.writeInt(gatewayRc);
        if (flowVersion == 0x10100) {
            out.writeBytes(toPaddedString(requestType, 4));
        } else {
            out.writeInt(requestType.length());
            out.writeBytes(toPaddedString(requestType, requestType.length()));
        }
        if (flowVersion >= 0x200000)
            out.writeBoolean(hasSecurity);
        out.writeInt(dataWhichFollows);

        out.write(eciArea, 0, dataWhichFollows);
    }