2010/6/15 Markus Wiederkehr <[email protected]>:
> Maybe a stupid question but who is jochen?

Jochen is a James committer: he provided a lot of patches against
mime4j at the end of 2007 (see the first MIME4J JIRA issues with "JW"
in the subject).

He's also a long time Apache committer (pmc for commons and ws
projects) so we granted him svn karma early in the process.

Stefano

> Cheers,
> Markus
>
> PS: http://james.apache.org/weare.html
>
>
>
> On Tue, Jun 15, 2010 at 8:31 AM,  <[email protected]> wrote:
>> Author: jochen
>> Date: Tue Jun 15 06:31:13 2010
>> New Revision: 954722
>>
>> URL: http://svn.apache.org/viewvc?rev=954722&view=rev
>> Log:
>> Adding implementation of skip(long).
>>
>> Modified:
>>    
>> james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java
>>
>> Modified: 
>> james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java
>> URL: 
>> http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java?rev=954722&r1=954721&r2=954722&view=diff
>> ==============================================================================
>> --- 
>> james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java
>>  (original)
>> +++ 
>> james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java
>>  Tue Jun 15 06:31:13 2010
>> @@ -126,4 +126,23 @@ public class LineReaderInputStreamAdapto
>>                        return false;
>>                }
>>        }
>> +
>> +       @Override
>> +       public long skip(long count) throws IOException {
>> +               if (count <= 0) {
>> +                       return 0; // So specified by InputStream.skip(long).
>> +               }
>> +               final int bufferSize = count > 8192 ? 8192 : (int) count;
>> +               final byte[] buffer = new byte[bufferSize];
>> +               long result = 0;
>> +               while (count > 0) {
>> +                       int res = read(buffer);
>> +                       if (res == -1) {
>> +                               break;
>> +                       }
>> +                       result += res;
>> +                       count -= res;
>> +               }
>> +               return result;
>> +       }
>>  }
>

Reply via email to