I created the buffer in the constructor where buffer = new int[matchLength].
I left the rest = 0. This seems to work.
Sincerely,
Anthony Eden
----------
>From: "Anthony Eden" <[EMAIL PROTECTED]>
>To: Java Apache Mail Server <[EMAIL PROTECTED]>
>Subject: Re: Problem with RFC compatibility
>Date: Thu, Jun 15, 2000, 3:07 PM
>
> What are the values for:
>
> buffer
> head
> tail
> size
>
>
> At run time?
>
> Sincerely,
> Anthony Eden
>
> ----------
>>From: Federico Barbieri <[EMAIL PROTECTED]>
>>To: Java Apache Mail Server <[EMAIL PROTECTED]>
>>Subject: Re: Problem with RFC compatibility
>>Date: Thu, Jun 15, 2000, 2:51 PM
>>
>
>> Anthony Eden wrote:
>>>
>>> Did you modify the CharTerminatedInputStream and place it in the Avalon CVS?
>>
>> Nop... since there are minor changes going on avalon too the avalon cvs
>> has not been update. I'll do it today.
>>
>> So James cvs tree contains the last Avalon.jar and
>> CharTerminatedInputStream while avalon tree is one step back.
>>
>> Here's the new CharTerminatedInputStream read() method:
>>
>> public int read()
>> throws IOException {
>> int next;
>> int match = 0;
>> if (!isEmpty()) next = pop();
>> else next = in.read();
>>
>> if (next == EOM[0]) {
>> append(next);
>> while (next == EOM[match++]) {
>> if (isFull()) return -1;
>> next = in.read();
>> append(next);
>> }
>> return pop();
>> } else {
>> return next;
>> }
>> }
>>
>> private void append(int next) {
>> size++;
>> buffer[head++ % matchLength] = next;
>> }
>>
>> private int pop() {
>> size--;
>> return buffer[tail++ % matchLength];
>> }
>>
>> private boolean isFull() {
>> return size >= matchLength;
>> }
>>
>> private boolean isEmpty() {
>> return size == 0;
>> }
>>
>>
>> Federico Barbieri
>> <[EMAIL PROTECTED]>
>>
>>
>> ------------------------------------------------------------
>> To subscribe: [EMAIL PROTECTED]
>> To unsubscribe: [EMAIL PROTECTED]
>> Archives and Other: <http://java.apache.org/>
>> Problems?: [EMAIL PROTECTED]
>>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives and Other: <http://java.apache.org/>
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]