geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeUtility.java [1327:1357]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void write(int ch) {
        // we found a linebreak.  Reset the line length counters on either one.  We don't
        // really need to validate here.
        if (ch == '\n' || ch == '\r') {
            // we found a newline, this is only valid if the previous char was the '\r'
            if (ch == '\n') {
                // malformed linebreak?  force this to base64 encoding.
                if (previousChar != '\r') {
                    containsMalformedEOL = true;
                }
            }
            // hit a line end, reset our line length counter
            span = 0;
        }
        else {
            span++;
            // the text has long lines, we can't transfer this as unencoded text.
            if (span > 998) {
                containsLongLines = true;
            }

            // non-ascii character, we have to transfer this in binary.
            if (!ASCIIUtil.isAscii(ch)) {
                nonAsciiChars++;
            }
            else {
                asciiChars++;
            }
        }
        previousChar = ch;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.5_spec/src/main/java/javax/mail/internet/MimeUtility.java [1327:1357]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void write(final int ch) {
        // we found a linebreak.  Reset the line length counters on either one.  We don't
        // really need to validate here.
        if (ch == '\n' || ch == '\r') {
            // we found a newline, this is only valid if the previous char was the '\r'
            if (ch == '\n') {
                // malformed linebreak?  force this to base64 encoding.
                if (previousChar != '\r') {
                    containsMalformedEOL = true;
                }
            }
            // hit a line end, reset our line length counter
            span = 0;
        }
        else {
            span++;
            // the text has long lines, we can't transfer this as unencoded text.
            if (span > 998) {
                containsLongLines = true;
            }

            // non-ascii character, we have to transfer this in binary.
            if (!ASCIIUtil.isAscii(ch)) {
                nonAsciiChars++;
            }
            else {
                asciiChars++;
            }
        }
        previousChar = ch;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



