org.ipdr.ftp
Class RangeFile

java.lang.Object
  extended by org.ipdr.ftp.RangeFile

public class RangeFile
extends java.lang.Object

This class allows operations on a Range file for a SubscriptionGroup. The operations include getting and settign of first and last sequence numbers.


Field Summary
protected  java.io.File rangeFile_
           
protected  java.net.URL rangeFileURL_
           
 
Constructor Summary
RangeFile(java.lang.String rangeFileLocation)
           Constructor for RangeFile.
RangeFile(java.net.URL rangeFileURL)
           Constructor for RangeFile.
 
Method Summary
 java.lang.String getFirstSequenceNbr()
           Reads the initial sequence number from the Range file and returns it.
 java.lang.String getLastSequenceNbr()
           Reads the current sequence number from the Range file and returns it.
 boolean setFirstSequenceNbr(java.lang.String initialSeqNbr)
           Writes the initial sequence number to the Range file.
 boolean setLastSequenceNbr(java.lang.String currentSeqNbr)
           Writes the current sequence number to the Range file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rangeFile_

protected java.io.File rangeFile_

rangeFileURL_

protected java.net.URL rangeFileURL_
Constructor Detail

RangeFile

public RangeFile(java.net.URL rangeFileURL)
          throws IPDRFTPException

Constructor for RangeFile.

Parameters:
rangeFileURL - URL object to the range file.

Throws:
IPDRFTPException

RangeFile

public RangeFile(java.lang.String rangeFileLocation)
          throws IPDRFTPException

Constructor for RangeFile.

Parameters:
rangeFileLocation - String containing the exact location of the range file

Throws:
IPDRFTPException
Method Detail

getFirstSequenceNbr

public java.lang.String getFirstSequenceNbr()
                                     throws IPDRFTPException

Reads the initial sequence number from the Range file and returns it.

Returns:
String A string containing initial sequence number read from the Range file.

Throws:
IPDRFTPException

getLastSequenceNbr

public java.lang.String getLastSequenceNbr()
                                    throws IPDRFTPException

Reads the current sequence number from the Range file and returns it.

Returns:
String A string containing current sequence number read from the Range file.

Throws:
IPDRFTPException

setFirstSequenceNbr

public boolean setFirstSequenceNbr(java.lang.String initialSeqNbr)
                            throws IPDRFTPException

Writes the initial sequence number to the Range file.

Parameters:
initialSeqNbr - the string containing the initial sequence number that is to be written to the Range file.
Returns:
boolean indicating the success/failure of operation.

Throws:
IPDRFTPException

setLastSequenceNbr

public boolean setLastSequenceNbr(java.lang.String currentSeqNbr)
                           throws IPDRFTPException

Writes the current sequence number to the Range file.

Parameters:
currentSeqNbr - the string containing the current sequence number that is to be written to the Range file.
Returns:
boolean indicating the success/failure of operation.

Throws:
IPDRFTPException