Hello, All!

The fix for JDK6 and JDK7 is pretty necessary as Russian tax office uses Russian names for its web service definitions.


    /**
     * Adds line breaks to enforce a maximum 72 bytes per line.
     */
    static void make72Safe(StringBuffer line) {
        int length = line.length();
        if (length > 72) {
            int index = 70;
            while (index < length - 2) {
                // Nikolay Samofatov 2011-10-24: avoid breaking UTF8 sequences
                while (line.charAt(index) >= 128 && line.charAt(index) < 192)
                  index--;

                line.insert(index, "\r\n ");
                index += 72;
                length += 3;
            }
        }
        return;
    }


--
Nikolay Samofatov, MBA
Red Soft Corporation
+7 495 668 3735

Reply via email to