|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rhq.common.drift.ChangeSetReaderImpl
public class ChangeSetReaderImpl
Note that this implementation does not do any validation for the most part. It assumes that entries in the change set file contain valid, 64 character SHA-256 hashes. It assumes that all headers are present in the file and in the correct order. It assume that all paths are non-null.
The one thing that the read does check is the drift category code for each file entry. If the code is not valid, an error message is logged and aChangeSetReaderException
is thrown.
| Constructor Summary | |
|---|---|
ChangeSetReaderImpl(File metaDataFile)
|
|
ChangeSetReaderImpl(Reader metaDataFile)
|
|
ChangeSetReaderImpl(Reader metaDataFile,
boolean closeStream)
Creates a new change set reader. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the reader. |
Headers |
getHeaders()
Returns the headers from change set file. |
Iterator<FileEntry> |
iterator()
|
FileEntry |
read()
Read and return the next file entry or null if the end of the file has been reached. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChangeSetReaderImpl(File metaDataFile)
throws ChangeSetReaderException
ChangeSetReaderException
public ChangeSetReaderImpl(Reader metaDataFile)
throws Exception
Exception
public ChangeSetReaderImpl(Reader metaDataFile,
boolean closeStream)
throws Exception
close() will close the stream regardless of the value of
closeStream.
metaDataFile - closeStream -
Exception| Method Detail |
|---|
public Headers getHeaders()
throws ChangeSetReaderException
ChangeSetReader
getHeaders in interface ChangeSetReaderChangeSetReaderException - If an error occurs reading the file or the headers
are not formatted correctly.
public FileEntry read()
throws ChangeSetReaderException
ChangeSetReader
read in interface ChangeSetReaderChangeSetReaderException - if an IO error occurs or if the file entry is not
properly formatted.
public void close()
throws ChangeSetReaderException
ChangeSetReader
close in interface ChangeSetReaderChangeSetReaderException - if an IO error occurspublic Iterator<FileEntry> iterator()
iterator in interface Iterable<FileEntry>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||