reading less than available prevent next onDataAvailable

ASSIGNED
Assigned to

Status

Core Graveyard
Java-Implemented Plugins
P3
normal
ASSIGNED
19 years ago
6 years ago

People

(Reporter: Victor V. Lapitskiy, Assigned: louis.martin)

Tracking

Trunk
x86
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: suntrak-n6)

(Reporter)

Description

19 years ago
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

Updated

19 years ago
Status: NEW → ASSIGNED

Updated

18 years ago
Blocks: 21564

Updated

18 years ago
Assignee: idk → louis.martin
Status: ASSIGNED → NEW

Comment 1

18 years ago
It is documentation bug.
I am reasingning this bug to louis.martin@eng.sun.com
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED

Comment 2

18 years ago
NOTE: Changed primary QA contact person (rest of it remains the same).
QA Contact: leila.garin → rpallath

Updated

18 years ago
No longer blocks: 21564

Comment 3

18 years ago
Add status whiteboard keyword, add CC
Whiteboard: suntrak-n6

Comment 4

14 years ago
Any progress on this bug yet?
Component: Java-Implemented Plugins → Java-Implemented Plugins
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.