Skip to content

What is stream.isOnline() used for? #29

@angelalukic

Description

@angelalukic

I don't often post to issues and I'm still very new to this kind of thing so I'm sorry if this question has already been answered or is perhaps obvious.

I'm currently trying to check whether or not a stream is online. I thought to use the isOnline() method in the JavaDoc Stream class. If the stream is online, this will return true. If it is offline, it returns a NullPointerException.

I have looked at this issue #18 which implies that the entire stream will be null if the Twitch stream is offline, which would explain why I am getting this NullPointerException. However the JavaDoc makes reference that the isOnline() method should return false if it is offline.

My entire code looks like this:

@Override
public void onSuccess(Stream stream) {
	log.info("" + stream.isOnline());					
}				

My question isn't so much how to check if my Twitch stream is online, but rather what is the correct usage of isOnline()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions