tvbrowser.extras.common

## Class ChannelItem

- java.lang.Object
- - tvbrowser.extras.common.ChannelItem

-     public class ChannelItem
      extends java.lang.Object

  A class that contains informations about a channel. Used to keep channel values even if channel is currently not available.
  Author:
    René Mach

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChannelItem(Channel channel)` Creates an instance of this class.
    `ChannelItem(java.io.ObjectInputStream in, int version)` Load the channel item from an stream.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Channel` | `getChannel()` Gets the channel of this channel item.
    `boolean` | `isAvailableOrNullChannel()` Gets if this channel ist available or is a null channel
    `boolean` | `isNullChannel()` Gets if this channel is a null channel.
    `boolean` | `isValid()` Gets if this channel is valid (could be found).
    `void` | `reValidate()` Tries to load channel again.
    `void` | `saveItem(java.io.ObjectOutputStream out)` Saves this channel item in an output stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ChannelItem

          public ChannelItem(Channel channel)

      Creates an instance of this class.

      Parameters:
        `channel` - The channel to keep in this ChannelItem.

    - #### ChannelItem

          public ChannelItem(java.io.ObjectInputStream in,
                     int version)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException

      Load the channel item from an stream.

      Parameters:
        `in` - The stream to read the channel values from.
        `version` - The version of the file.
      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

  - ### Method Detail

    - #### isValid

          public boolean isValid()

      Gets if this channel is valid (could be found).

      Returns:
        `True` if this channel is valid, `false` otherwise.

    - #### isAvailableOrNullChannel

          public boolean isAvailableOrNullChannel()

      Gets if this channel ist available or is a null channel

      Returns:
        `True` if this channel is available or a null channel, `false` otherwise.

    - #### getChannel

          public Channel getChannel()

      Gets the channel of this channel item.

      Returns:
        The channel of this item or `null` if the channel is not valid (could not be found).

    - #### saveItem

          public void saveItem(java.io.ObjectOutputStream out)
                        throws java.io.IOException

      Saves this channel item in an output stream.

      Parameters:
        `out` - The stream to save this item in.
      Throws:
        `java.io.IOException`

    - #### isNullChannel

          public boolean isNullChannel()

      Gets if this channel is a null channel.

      Returns:
        `True` if the channel is a null channel, `false` otherwise.

    - #### reValidate

          public void reValidate()

      Tries to load channel again.

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)