|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjautil.avatar.AvatarCacheDescriptor
public class AvatarCacheDescriptor
Descriptor for an entry in the avatar data cache.
Constructor Summary | |
---|---|
AvatarCacheDescriptor(java.lang.String av,
java.lang.String avurl,
java.lang.String cdurl,
long tstamp,
int len)
|
Method Summary | |
---|---|
java.lang.String |
avatar()
|
java.lang.String |
cacheURL()
|
void |
clearTempFile()
Clears the temporary file setting for this descriptor. |
int |
dataLength()
|
static java.lang.String[] |
getLines(java.io.InputStream ins)
Reads and returns the lines from the given input stream. |
static AvatarCacheDescriptor |
makeDescriptor(java.lang.String[] dlines)
Creates a new descriptor from the given array of data lines. |
boolean |
matches(AvatarCacheDescriptor acd)
|
boolean |
matchesAvatarAndURL(java.lang.String av,
java.lang.String aurl)
|
boolean |
matchesTimeAndLength(long ts,
int len)
Determines whether or not the time stamp and data length for the original URL described here match the given values. |
boolean |
matchesURL(java.lang.String avurl)
Indicates whether the given avatar URL matches the original URL for this descriptor. |
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. |
void |
setTempFile(java.io.File tmpf)
Records the given temporary file as the current one for cached avatar data described here. |
java.io.File |
tempFile()
Returns the current temporary file setting for this descriptor, or null if there is currently no associated temporary file. |
java.lang.String |
tempFileURL()
Returns a file: URL for the temporary file currently set
for this descriptor,
or null if there is currently no associated temporary file. |
long |
timeStamp()
|
java.lang.String |
url()
|
void |
write(java.io.OutputStream outs)
Writes the essential data for this cache entry (avatar name, original URL, cache data URL, original time stamp, and original data length) to the given output stream |
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, java.lang.String cdurl, long tstamp, int len)
Method Detail |
---|
public java.lang.String avatar()
public java.lang.String url()
public java.lang.String cacheURL()
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 setTempFile(java.io.File tmpf)
public void clearTempFile()
public java.io.File tempFile()
null
if there is currently no associated temporary file.
public java.lang.String tempFileURL()
file:
URL for the temporary file currently set
for this descriptor,
or null
if there is currently no associated temporary file.
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)
public static java.lang.String[] getLines(java.io.InputStream ins) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |