public class PersistentExceptionNode extends PersistentListNode
History:
Constructor and Description |
---|
PersistentExceptionNode(long address)
Create an object of rule's exception, using an address in the binary file.
|
PersistentExceptionNode(long address,
long next)
Create an object of rule's exception, using an address in the binary file
and the address of the next exception.
|
PersistentExceptionNode(java.lang.String key,
java.lang.String value)
Create an object of rule's exception, using a key value pair.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
GetKey()
Get the string of matching pattern of the rule's exception.
|
static PersistentListNode |
GetNode(java.io.RandomAccessFile raf,
long address)
Get data of a persistent list node at a specific addrss of a specific
binary file.
|
java.lang.String |
GetValue()
Get the string of changing pattern of the rule's exception.
|
static void |
PrintList(java.lang.String exceptionPath,
long address)
Print the detail information of rule's exceptions for a specific
file at a specific address.
|
void |
ReadData(java.io.RandomAccessFile raf)
Read the matching and changing string partterns from a specific binary
file.
|
void |
WriteData(java.io.RandomAccessFile raf)
Write the matching and changing string partterns to a specific binary
file.
|
GetAddress, GetNext, PrintList, SetAddress, SetNext
public PersistentExceptionNode(long address)
address
- the address of current persistent exception nodepublic PersistentExceptionNode(long address, long next)
address
- the address of current persistent exception nodenext
- address of the next node of current nodepublic PersistentExceptionNode(java.lang.String key, java.lang.String value)
key
- the string for matching patternvalue
- the string for changing patternpublic java.lang.String GetKey()
public java.lang.String GetValue()
public void WriteData(java.io.RandomAccessFile raf) throws java.io.IOException
WriteData
in class PersistentListNode
raf
- the object of random access filejava.io.IOException
- if problems of writing data to random access file
happen.public void ReadData(java.io.RandomAccessFile raf) throws java.io.IOException
ReadData
in class PersistentListNode
raf
- the object of random access filejava.io.IOException
- if problems of reading data to random access file
happen.public static PersistentListNode GetNode(java.io.RandomAccessFile raf, long address) throws java.io.IOException
raf
- the object of random access fileaddress
- the address of the persistent list node to be retrievedjava.io.IOException
- if problems of accessing random access file
happen.public static void PrintList(java.lang.String exceptionPath, long address) throws java.io.IOException
exceptionPath
- the path/file name of the rule's exceptions to be
printedaddress
- the address of the rule's exceptions in a random access
filejava.io.IOException
- if problems of accessing random access file
happen.