|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjautil.cache.JACacheDescriptor
public class JACacheDescriptor
An in-memory copy of a descriptor entry from a remote file
cache of the kind managed by an JACacheHandler
.
Constructor Summary | |
---|---|
JACacheDescriptor(java.lang.String enm,
java.lang.String durl,
long tstamp,
int len)
Constructs a new descriptor with the given entry name, original data URL, time stamp and data length. |
Method Summary | |
---|---|
int |
dataLength()
Returns the length of the original data file for the entry to which this descriptor refers. |
java.lang.String |
entryName()
Returns the name of the entry to which this descriptor refers. |
static JACacheDescriptor |
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: entry name, original data URL, cache data URL, time stamp, data length. |
boolean |
matches(JACacheDescriptor cd)
Indicates whether this descriptor matches and is in synch with the given one -- specifically whether their associated time stamps, data lengths, entry names and original data URLs are the same. |
boolean |
matchesNameAndURL(java.lang.String enm,
java.lang.String durl)
Indicates whether the given entry 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 entry to which this descriptor refers. |
boolean |
matchesURL(java.lang.String durl)
Indicates whether the given data URL is the same as the original data URL for the entry to which this descriptor refers. |
static JACacheDescriptor |
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 data URL for the avatar to which this descriptor refers. |
java.lang.String |
url()
Returns the original data URL for the entry 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 JACacheDescriptor(java.lang.String enm, java.lang.String durl, long tstamp, int len)
Method Detail |
---|
public java.lang.String entryName()
public java.lang.String url()
public long timeStamp()
public int dataLength()
public boolean matches(JACacheDescriptor cd)
public boolean matchesNameAndURL(java.lang.String enm, java.lang.String durl)
public boolean matchesURL(java.lang.String durl)
public boolean matchesTimeAndLength(long ts, int len)
public void write(java.io.OutputStream outs)
public static JACacheDescriptor readDescriptor(java.io.InputStream dins)
null
if there is an input
error.
public static JACacheDescriptor makeDescriptor(java.lang.String[] dlines)
null
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |