Closed Bug 18847 Opened 20 years ago Closed Last year

reading less than available prevent next onDataAvailable

Categories

(Core Graveyard :: Java-Implemented Plugins, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lvv, Assigned: louis.martin)

Details

(Whiteboard: suntrak-n6)

The required policy of reading data from stream argument
of onDataAvailable method isn't specified. In case when
in onDataAvailable method the amount of read data is less than
available and after that return occured, then next call
of onDataAvailable will never occur.
So the required policy (for example minimum of read data)
should be specified or next calls of onDataAvailable in the case
described above should occur.

Steps to Reproduce:
1)use the following implementation for your
  PlugletStreamListener.onDataAvailable method:

    public void onDataAvailable(PlugletStreamInfo plugletInfo, InputStream
input,int  length) {
	try{
	    System.out.println("PlugletStreamListener.onDataAvailable");
	    System.out.println("input.available is "+input.available());
	    int amount = input.available() - 1;
	    byte[] buf = new byte[amount];
	    int l = input.read(buf, 0, amount);
	    System.out.println("Read amount is "+l);
	} catch(Exception e) {
	    ;
	}

    }


2)for the value of src attribute use the file with such size that more
  than one call of onDataAvailable should occur (in current
  implementation it is sufficient to use any file with size
  more than 100K)

3)load the corresponding page to start your pluglet

Actual Results:
Your will see that only one call of onDataAvailbale occur and
the file will not be loaded completely.

Expected Results:
The next calls of onDataAvailable should occur or such
implementation of the method should be incorrect based on specification.

Build Date & Platform Bug Found:
November 12, 1999; WinNT
Status: NEW → ASSIGNED
Blocks: 21564
Assignee: idk → louis.martin
Status: ASSIGNED → NEW
It is documentation bug.
I am reasingning this bug to louis.martin@eng.sun.com
Status: NEW → ASSIGNED
NOTE: Changed primary QA contact person (rest of it remains the same).
QA Contact: leila.garin → rpallath
No longer blocks: 21564
Add status whiteboard keyword, add CC
Whiteboard: suntrak-n6
Any progress on this bug yet?
Product: Core → Core Graveyard
Dead component, closing all bugs in it.
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.