xmlBlaster 2.1.0 API

org.xmlBlaster.contrib.filewatcher
Class FileInfo

java.lang.Object
  extended by org.xmlBlaster.contrib.filewatcher.FileInfo

public class FileInfo
extends java.lang.Object

FileInfo is a placeholder for the information necessary to the poller about each file.

Author:
Michele Laghi

Field Summary
private  long lastChange
           
private  java.lang.String name
           
private  long size
           
private  long timestamp
           
 
Constructor Summary
FileInfo()
          Default Constructor
FileInfo(java.io.File file, java.util.logging.Logger log)
          Convenience constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 long getLastChange()
           
 java.lang.String getLastChangeStr()
           
 java.lang.String getName()
           
 java.lang.String getRelativeName()
           
static java.lang.String getRelativeName(java.lang.String name)
           
 long getSize()
           
 long getTimestamp()
           
 java.lang.String getTimestampStr()
           
 java.lang.String toXml(java.lang.String offset)
           
 void update(java.io.File file, java.util.logging.Logger log)
          updates this info object with the data contained in file.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

timestamp

private long timestamp

size

private long size

lastChange

private long lastChange
Constructor Detail

FileInfo

public FileInfo()
Default Constructor


FileInfo

public FileInfo(java.io.File file,
                java.util.logging.Logger log)
Convenience constructor

Parameters:
file -
Method Detail

update

public void update(java.io.File file,
                   java.util.logging.Logger log)
updates this info object with the data contained in file. If file is null, then the method silently returns.

Parameters:
file -

getLastChange

public long getLastChange()
Returns:
Returns the lastChange.

getTimestampStr

public java.lang.String getTimestampStr()

getLastChangeStr

public java.lang.String getLastChangeStr()

getName

public java.lang.String getName()
Returns:
Returns the name.

getRelativeName

public static java.lang.String getRelativeName(java.lang.String name)

getRelativeName

public java.lang.String getRelativeName()

getSize

public long getSize()
Returns:
Returns the size.

getTimestamp

public long getTimestamp()
Returns:
Returns the timestamp.

toXml

public java.lang.String toXml(java.lang.String offset)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.