geronimo-mail_2.1_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java [119:140]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private int getBytes(final byte[] data, int offset, int length) throws IOException {

        int readCharacters = 0;
        while (length > 0) {
            // need data?  Try to get some
            if (!dataAvailable()) {
                // if we can't get this, return a count of how much we did get (which may be -1).
                if (!decodeStreamData()) {
                    return readCharacters > 0 ? readCharacters : -1;
                }
            }

            // now copy some of the data from the decoded buffer to the target buffer
            final int copyCount = Math.min(decodedCount, length);
            System.arraycopy(decodedChars, decodedIndex, data, offset, copyCount);
            decodedIndex += copyCount;
            decodedCount -= copyCount;
            offset += copyCount;
            length -= copyCount;
            readCharacters += copyCount;
        }
        return readCharacters;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-mail_2.1_spec/src/main/java/org/apache/geronimo/mail/util/UUDecoderStream.java [106:127]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private int getBytes(final byte[] data, int offset, int length) throws IOException {

        int readCharacters = 0;
        while (length > 0) {
            // need data?  Try to get some
            if (!dataAvailable()) {
                // if we can't get this, return a count of how much we did get (which may be -1).
                if (!decodeStreamData()) {
                    return readCharacters > 0 ? readCharacters : -1;
                }
            }

            // now copy some of the data from the decoded buffer to the target buffer
            final int copyCount = Math.min(decodedCount, length);
            System.arraycopy(decodedChars, decodedIndex, data, offset, copyCount);
            decodedIndex += copyCount;
            decodedCount -= copyCount;
            offset += copyCount;
            length -= copyCount;
            readCharacters += copyCount;
        }
        return readCharacters;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



