com.jscape.inet.nntp

## Class NntpNewsgroup

- java.lang.Object
- - com.jscape.inet.nntp.NntpNewsgroup

-     public class NntpNewsgroup
      extends java.lang.Object

  Implements methods for manipulating NNTP newsgroups. Note:
  According to RFC 977, server is not required to return exact article count in response to GROUP command. In addition, often NntpNewsgroup is created from response to LIST command in which case article count is not returned at all but can be estimated from FIRST and LAST fields. Thus, the article count provided by this class should not be regarded as exact value.
  Posting permissions can also be treated with suspicion as GROUP command will not return any information regarding posting and LIST command returns this information based on authentication at the moment of invoking LIST command.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getArticleCount()` Gets estimated article count for this `NntpNewsgroup`.
    `int` | `getFirst()` Returns the value of FIRST field returned by LIST and GROUP commands.
    `int` | `getLast()` Returns the value of LAST field returned by LIST and GROUP commands.
    `java.lang.String` | `getName()` Gets name of this `NntpNewsgroup`.
    `boolean` | `getPostPermission()` Gets posting permissions for this NntpNewsgroup at time of retrieving newsgroup data.
    `java.lang.String` | `toString()` Gets string representation of newsgroup in format as expected by server when posting article.

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Gets name of this `NntpNewsgroup`.
      Returns:
        name

    - #### getFirst

          public int getFirst()

      Returns the value of FIRST field returned by LIST and GROUP commands.
      Returns:
        value of FIRST field

    - #### getLast

          public int getLast()

      Returns the value of LAST field returned by LIST and GROUP commands.
      Returns:
        value of LAST field

    - #### getArticleCount

          public int getArticleCount()

      Gets estimated article count for this `NntpNewsgroup`.
      Returns:
        article count

    - #### getPostPermission

          public boolean getPostPermission()

      Gets posting permissions for this NntpNewsgroup at time of retrieving newsgroup data.
      Returns:
        `true` if posting allowed, `false` otherwise

    - #### toString

          public java.lang.String toString()

      Gets string representation of newsgroup in format as expected by server when posting article.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        name of newsgroup

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved