toxTree.io.batch
Class FileState

java.lang.Object
  extended by toxTree.io.batch.FileState
All Implemented Interfaces:
java.io.Serializable

public class FileState
extends java.lang.Object
implements java.io.Serializable

This is to be able to verify if a file has changed since it has been last processed by BatchProcessing

Author:
Nina Jeliazkova Modified 2005-9-4
See Also:
Serialized Form

Field Summary
protected  long currentRecord
           
protected  java.io.File file
           
protected  java.lang.String filename
           
protected  int hashCode
           
protected  long lastModified
           
protected  long length
           
protected  long offset
           
 
Constructor Summary
FileState()
           
FileState(java.io.File file)
           
FileState(java.lang.String filename)
           
 
Method Summary
 java.io.File createFile()
           
 boolean equals(java.lang.Object obj)
           
 long getCurrentRecord()
           
 java.io.File getFile()
           
 java.lang.String getFilename()
           
 int getHashCode()
           
 long getLastModified()
           
 long getLength()
           
 long getOffset()
           
 boolean match()
           
 boolean match(java.io.File file)
           
 void setCurrentRecord(long currentRecord)
           
 void setFile(java.io.File file)
           
 void setFilename(java.lang.String filename)
           
 void setHashCode(int hashCode)
           
 void setLastModified(long lastModified)
           
 void setLength(long length)
           
 void setOffset(long offset)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filename

protected java.lang.String filename

length

protected long length

lastModified

protected long lastModified

hashCode

protected int hashCode

file

protected transient java.io.File file

offset

protected long offset

currentRecord

protected long currentRecord
Constructor Detail

FileState

public FileState()

FileState

public FileState(java.lang.String filename)

FileState

public FileState(java.io.File file)
Method Detail

equals

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

getFilename

public java.lang.String getFilename()
Returns:
Returns the filename.

setFilename

public void setFilename(java.lang.String filename)
Parameters:
filename - The filename to set.

getHashCode

public int getHashCode()
Returns:
Returns the hashCode.

setHashCode

public void setHashCode(int hashCode)
Parameters:
hashCode - The hashCode to set.

getLastModified

public long getLastModified()
Returns:
Returns the lastModified.

setLastModified

public void setLastModified(long lastModified)
Parameters:
lastModified - The lastModified to set.

getLength

public long getLength()
Returns:
Returns the length.

setLength

public void setLength(long length)
Parameters:
length - The length to set.

getFile

public java.io.File getFile()
Returns:
Returns the file.

setFile

public void setFile(java.io.File file)
Parameters:
file - The file to set.

getCurrentRecord

public long getCurrentRecord()
Returns:
Returns the currentRecord.

setCurrentRecord

public void setCurrentRecord(long currentRecord)
Parameters:
currentRecord - The currentRecord to set.

getOffset

public long getOffset()
Returns:
Returns the offset.

setOffset

public void setOffset(long offset)
Parameters:
offset - The offset to set.

match

public boolean match()
              throws BatchProcessingException
Throws:
BatchProcessingException

match

public boolean match(java.io.File file)

createFile

public java.io.File createFile()
                        throws BatchProcessingException
Throws:
BatchProcessingException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2012 Ideaconsult Ltd.. All Rights Reserved.