|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjautil.avatar.AvatarCacheDescriptor
public class AvatarCacheDescriptor
An in-memory copy of a descriptor entry from an avatar
definitions cache of the kind managed by an AvatarsCacheHandler
.
Constructor Summary | |
---|---|
AvatarCacheDescriptor(java.lang.String av,
java.lang.String avurl,
long tstamp,
int len)
Constructs a new descriptor with the given avatar name, original avatar data URL, cache data URL, time stamp and data length. |
Method Summary | |
---|---|
java.lang.String |
avatar()
Returns the name of the avatar to which this descriptor refers. |
int |
dataLength()
Returns the length of the data file for the avatar to which this desriptor refers. |
static AvatarCacheDescriptor |
makeDescriptor(java.lang.String[] dlines)
Creates a new descriptor from the given array of data lines, which is expected to contain the following items, one per line, in order: avatar name, original data URL, cache data URL, time stamp, data length. |
boolean |
matches(AvatarCacheDescriptor acd)
Indicates whether this descriptor matches and is in synch with the given one -- specifically whether their associated time stamps, data lengths, avatar names and original data URLs are the same. |
boolean |
matchesAvatarAndURL(java.lang.String av,
java.lang.String aurl)
Indicates whether the given avatar name and original data URL are the same as those to which this descriptor refers. |
boolean |
matchesTimeAndLength(long ts,
int len)
Indicates whether or not the given time stamp and and original URL data length are the same as those for the avatar to which this descriptor refers. |
boolean |
matchesURL(java.lang.String avurl)
Indicates whether the given avatar URL is the same as the original data URL for the avatar to which this descriptor refers. |
static AvatarCacheDescriptor |
readDescriptor(java.io.InputStream dins)
Builds and returns a new descriptor based on the data obtained from the given stream, or returns null if there is an input
error. |
long |
timeStamp()
Returns the time stamp of the original avatar data URL for the avatar to which this descriptor refers. |
java.lang.String |
url()
Returns the original avatar data URL for the avatar to which this descriptor refers. |
void |
write(java.io.OutputStream outs)
Writes the this descriptor's non-transient data to the given output stream, one item per line in the standard encoding (UTF-8). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AvatarCacheDescriptor(java.lang.String av, java.lang.String avurl, long tstamp, int len)
Method Detail |
---|
public java.lang.String avatar()
public java.lang.String url()
public long timeStamp()
public int dataLength()
public boolean matches(AvatarCacheDescriptor acd)
public boolean matchesAvatarAndURL(java.lang.String av, java.lang.String aurl)
public boolean matchesURL(java.lang.String avurl)
public boolean matchesTimeAndLength(long ts, int len)
public void write(java.io.OutputStream outs)
public static AvatarCacheDescriptor readDescriptor(java.io.InputStream dins)
null
if there is an input
error.
public static AvatarCacheDescriptor makeDescriptor(java.lang.String[] dlines)
null
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |