|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ipdr.ftp.ControlFile
public class ControlFile
This class allows operations on a ControlFile. These operations include reading and writing IPDRDoc names from/to a control file.
Field Summary | |
---|---|
protected java.io.BufferedReader |
bufferedReader_
|
protected java.lang.String |
controlFileLocation_
|
protected java.net.URL |
controlFileURL_
|
protected boolean |
countNoOfVer_
|
protected int |
docCount_
|
protected java.io.FileOutputStream |
fileOutStream_
|
protected boolean |
reachedEnd_
|
protected java.lang.String |
VERSION_NUMBER
|
Constructor Summary | |
---|---|
ControlFile(java.lang.String controlFileLocation)
Constructor for ControlFile class, which accepts control file location as paramter. |
|
ControlFile(java.net.URL controlFileURL)
Constructor for ControlFile class, which accepts controlfileURL. |
Method Summary | |
---|---|
boolean |
addDocName(java.lang.String docName)
This method writes the IPDRDoc name, given by Producer, to the control file |
int |
getDocCount()
This method returns the value of docCount_ |
java.lang.String |
getDocName()
This method reads the IPDRDoc name, one by one, from the control file |
boolean |
isEnd()
This method reads the control file, one line at one time. |
void |
refreshControlFile()
This method gets a new input stream for the control file so that updated contents can be read. |
boolean |
writeEnd()
This method writes the VERSION_NUMBER string at the end of the document |
boolean |
writeStart()
This method writes the VERSION_NUMBER string at the start of the document |
protected boolean |
writeToControlFile(java.lang.String writeString)
This method writes the string, passed, to the control file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int docCount_
protected java.io.BufferedReader bufferedReader_
protected java.io.FileOutputStream fileOutStream_
protected java.lang.String controlFileLocation_
protected java.net.URL controlFileURL_
protected boolean countNoOfVer_
protected final java.lang.String VERSION_NUMBER
protected boolean reachedEnd_
Constructor Detail |
---|
public ControlFile(java.net.URL controlFileURL) throws IPDRFTPException
Constructor for ControlFile class, which accepts controlfileURL. This constructor is used mainly by Consumer.
controlFileURL
- The URL object to the control file.
IPDRFTPException
public ControlFile(java.lang.String controlFileLocation) throws IPDRFTPException
Constructor for ControlFile class, which accepts control file location as paramter. This is used, mainly by the Producer.
controlFileLocation
- The actual location of control file.
IPDRFTPException
Method Detail |
---|
public boolean writeStart() throws IPDRFTPException
This method writes the VERSION_NUMBER string at the start of the document
IPDRFTPException
public boolean writeEnd() throws IPDRFTPException
This method writes the VERSION_NUMBER string at the end of the document
IPDRFTPException
public boolean addDocName(java.lang.String docName) throws IPDRFTPException
This method writes the IPDRDoc name, given by Producer, to the control file
docName
- String that contains the IPDRDoc name to be written to
the Control file.
IPDRFTPException
public java.lang.String getDocName() throws IPDRFTPException
This method reads the IPDRDoc name, one by one, from the control file
IPDRFTPException
public boolean isEnd() throws IPDRFTPException
This method reads the control file, one line at one time. Returns true if it finds end of file VERSION_NUMBER string otherwise false.
IPDRFTPException
public int getDocCount() throws IPDRFTPException
This method returns the value of docCount_
IPDRFTPException
protected boolean writeToControlFile(java.lang.String writeString) throws IPDRFTPException
This method writes the string, passed, to the control file.
writeString
- the String that is to be written to the control file.
IPDRFTPException
public void refreshControlFile() throws IPDRFTPException
This method gets a new input stream for the control file so that updated contents can be read. It starts reading from the new line.
IPDRFTPException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |