[FAST-26] MulticastInputStream doesnot override public int available() throws IOException from java.io.InputStream Created: 14/Apr/10  Updated: 11/Apr/12  Resolved: 11/Apr/12

Status: Resolved
Project: OpenFAST
Component/s: None
Affects Version/s: 1.0.0
Fix Version/s: 1.1.0

Type: Bug Priority: Major
Reporter: Stas Gromov Assignee: Jacob Northey
Resolution: Fixed Votes: 0
Labels: None
Environment:

ANY



 Description   

java.io.InputStream has a method implemented

public int available() throws IOException

{ return 0; }

and comments

  • <p> A subclass' implementation of this method may choose to throw an
  • {@link IOException}

    if this input stream has been closed by

  • invoking the {@link #close()}

    method.
    *

  • <p> The {@code available}

    method for class

    {@code InputStream}

    always

  • returns {@code 0}

    .
    *

  • <p> This method should be overridden by subclasses.

but org.openfast.session.multicast.MulticastInputStream
does not override this method.

Suppose to add such code to org.openfast.session.multicast.MulticastInputStream

@Override
public int available() throws IOException

{ System.out.println("!2"+socket.isConnected()); return buffer.remaining(); }

 Comments   
Comment by Stas Gromov [ 14/Apr/10 ]

I meen

@Override
public int available() throws IOException

{ return buffer.remaining(); }

))

wo
System.out.println("!2"+socket.isConnected());

Comment by Stas Gromov [ 14/Apr/10 ]

seems, i was wrong in implementation. buffer can be empty, while data is available in socket...
but it's better than nothing

Comment by Stas Gromov [ 20/Dec/11 ]

setSOtimeout will helps alot, but we are blocked by java version upgrade.

Generated at Sat Nov 23 22:22:46 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.