geronimo-mail_2.1/geronimo-mail_2.1_provider/src/main/java/org/apache/geronimo/mail/util/MIMEInputReader.java [71:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public int read(char buffer[], int off, int len) throws IOException {
        // we've been asked for nothing, we'll return nothing. 
        if (len == 0) {
            return 0; 
        }
        
        // have we hit the end of data?  Return a -1 indicator
        if (endOfData) {
            return -1; 
        }
        
        // number of bytes read 
        int bytesRead = 0; 
        
        int lastRead; 
        
        while (bytesRead < len && (lastRead = source.read()) >= 0) {
            // We are checking for the end of a multiline response
            // the format is .CRLF
            
            // we also have to check for byte-stuffing situation 
            // where we remove a leading period.  
            if (atLineBreak && lastRead == '.') {
                // step to the next character 
                lastRead = source.read();
                // we have ".CR"...this is our end of stream 
                // marker.  Consume the LF from the reader and return 
                if (lastRead == '\r') {
                    source.read(); 
                    // no more reads from this point. 
                    endOfData = true; 
                    break; 
                }
                // the next character SHOULD be a ".".  We swallow the first 
                // dot and just write the next character to the buffer 
                atLineBreak = false; 
            }
            else if (lastRead == '\n') {
                // hit an end-of-line marker?
                // remember we just had a line break 
                atLineBreak = true; 
            }
            else 
            {
                // something other than a line break character 
                atLineBreak = false; 
            }
            // add the character to the buffer 
            buffer[off++] = (char)lastRead; 
            bytesRead++; 
        }
        
        // we must have had an EOF condition of some sort 
        if (bytesRead == 0) {
            return -1; 
        }
        // return the actual length read in 
        return bytesRead; 
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/util/MIMEInputReader.java [71:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public int read(char buffer[], int off, int len) throws IOException {
        // we've been asked for nothing, we'll return nothing. 
        if (len == 0) {
            return 0; 
        }
        
        // have we hit the end of data?  Return a -1 indicator
        if (endOfData) {
            return -1; 
        }
        
        // number of bytes read 
        int bytesRead = 0; 
        
        int lastRead; 
        
        while (bytesRead < len && (lastRead = source.read()) >= 0) {
            // We are checking for the end of a multiline response
            // the format is .CRLF
            
            // we also have to check for byte-stuffing situation 
            // where we remove a leading period.  
            if (atLineBreak && lastRead == '.') {
                // step to the next character 
                lastRead = source.read();
                // we have ".CR"...this is our end of stream 
                // marker.  Consume the LF from the reader and return 
                if (lastRead == '\r') {
                    source.read(); 
                    // no more reads from this point. 
                    endOfData = true; 
                    break; 
                }
                // the next character SHOULD be a ".".  We swallow the first 
                // dot and just write the next character to the buffer 
                atLineBreak = false; 
            }
            else if (lastRead == '\n') {
                // hit an end-of-line marker?
                // remember we just had a line break 
                atLineBreak = true; 
            }
            else 
            {
                // something other than a line break character 
                atLineBreak = false; 
            }
            // add the character to the buffer 
            buffer[off++] = (char)lastRead; 
            bytesRead++; 
        }
        
        // we must have had an EOF condition of some sort 
        if (bytesRead == 0) {
            return -1; 
        }
        // return the actual length read in 
        return bytesRead; 
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/main/java/org/apache/geronimo/javamail/util/MIMEInputReader.java [71:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public int read(char buffer[], int off, int len) throws IOException {
        // we've been asked for nothing, we'll return nothing. 
        if (len == 0) {
            return 0; 
        }
        
        // have we hit the end of data?  Return a -1 indicator
        if (endOfData) {
            return -1; 
        }
        
        // number of bytes read 
        int bytesRead = 0; 
        
        int lastRead; 
        
        while (bytesRead < len && (lastRead = source.read()) >= 0) {
            // We are checking for the end of a multiline response
            // the format is .CRLF
            
            // we also have to check for byte-stuffing situation 
            // where we remove a leading period.  
            if (atLineBreak && lastRead == '.') {
                // step to the next character 
                lastRead = source.read();
                // we have ".CR"...this is our end of stream 
                // marker.  Consume the LF from the reader and return 
                if (lastRead == '\r') {
                    source.read(); 
                    // no more reads from this point. 
                    endOfData = true; 
                    break; 
                }
                // the next character SHOULD be a ".".  We swallow the first 
                // dot and just write the next character to the buffer 
                atLineBreak = false; 
            }
            else if (lastRead == '\n') {
                // hit an end-of-line marker?
                // remember we just had a line break 
                atLineBreak = true; 
            }
            else 
            {
                // something other than a line break character 
                atLineBreak = false; 
            }
            // add the character to the buffer 
            buffer[off++] = (char)lastRead; 
            bytesRead++; 
        }
        
        // we must have had an EOF condition of some sort 
        if (bytesRead == 0) {
            return -1; 
        }
        // return the actual length read in 
        return bytesRead; 
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.6/geronimo-javamail_1.6_provider/src/main/java/org/apache/geronimo/javamail/util/MIMEInputReader.java [71:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public int read(char buffer[], int off, int len) throws IOException {
        // we've been asked for nothing, we'll return nothing. 
        if (len == 0) {
            return 0; 
        }
        
        // have we hit the end of data?  Return a -1 indicator
        if (endOfData) {
            return -1; 
        }
        
        // number of bytes read 
        int bytesRead = 0; 
        
        int lastRead; 
        
        while (bytesRead < len && (lastRead = source.read()) >= 0) {
            // We are checking for the end of a multiline response
            // the format is .CRLF
            
            // we also have to check for byte-stuffing situation 
            // where we remove a leading period.  
            if (atLineBreak && lastRead == '.') {
                // step to the next character 
                lastRead = source.read();
                // we have ".CR"...this is our end of stream 
                // marker.  Consume the LF from the reader and return 
                if (lastRead == '\r') {
                    source.read(); 
                    // no more reads from this point. 
                    endOfData = true; 
                    break; 
                }
                // the next character SHOULD be a ".".  We swallow the first 
                // dot and just write the next character to the buffer 
                atLineBreak = false; 
            }
            else if (lastRead == '\n') {
                // hit an end-of-line marker?
                // remember we just had a line break 
                atLineBreak = true; 
            }
            else 
            {
                // something other than a line break character 
                atLineBreak = false; 
            }
            // add the character to the buffer 
            buffer[off++] = (char)lastRead; 
            bytesRead++; 
        }
        
        // we must have had an EOF condition of some sort 
        if (bytesRead == 0) {
            return -1; 
        }
        // return the actual length read in 
        return bytesRead; 
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



