|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.anidb.udp.UdpAnimeDescriptionFactory
public class UdpAnimeDescriptionFactory
A factory for anime descriptions.
Method Summary | |
---|---|
java.lang.String |
getAnimeDescription(long animeId)
Returns the description for the anime with the given Id. |
static UdpAnimeDescriptionFactory |
getInstance(UdpConnection conn)
Returns an instance of this class. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static UdpAnimeDescriptionFactory getInstance(UdpConnection conn)
conn
- The connection.
java.lang.IllegalArgumentException
- If the connection is null
.public java.lang.String getAnimeDescription(long animeId) throws UdpConnectionException, AniDbException
Returns the description for the anime with the given Id.
It should be considered that this method has to use more than one request for retrieving the complete description. The reason is that a descrption can take up to ~5000 characters while the maximum data of an UDP packet is ~1400 bytes.
animeId
- The anime Id.
UdpConnectionException
- If a connection problem occured.
AniDbException
- If a problem with AniDB occured.UdpReturnCodes.NO_SUCH_ANIME
,
UdpReturnCodes.NO_SUCH_ANIME_DESCRIPTION
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |