|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--Help.HelpFileParser
This class provides the parser for reading a help file. After the file is parser, we write another file that contains the structure of menu we have just found.
MyMenu| Constructor Summary | |
HelpFileParser(String fileName)
The main constructor. |
|
| Method Summary | |
protected MyMenu[] |
createAllMenus()
This method creates all the menu from a file. |
protected MyMenu |
createSubTitleMenu(long startPosition,
long stopPosition)
This method create a submenu structure. |
protected MyMenu[] |
createSubTitlesMenu(Long[] position,
long lastValue)
This method creates all the submenu of a main menu. |
protected MyMenu |
createTitleMenu(long startPosition,
long stopPosition)
This method creates the main menu structure with no sub menu. |
protected MyMenu |
createTitleMenu(long startPosition,
long stopPosition,
MyMenu[] mySubMenu)
This method creates the main menu structure. |
protected Vector |
findAllParagraphs()
This method find all the paragraphs (titles and subtitles)in a file. |
protected void |
findSubTitles(Vector titleVector)
This method find all the subtitles between two titles. |
protected Long[] |
findTitleAndHisSubTitles(long startPosition)
This method finds a title and all his subtitles. |
static void |
main(String[] args)
The main method that read the file, creates all the menu, write them in a file, read the written file (to be sure that the operation is succesful) and put in the console some parameters of the file. |
protected MyMenu[] |
readStructure(String fileName)
This method read an array of menu from a file. |
protected void |
writeStructure(String fileName,
MyMenu[] menu)
This method write an array of menu in a file. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public HelpFileParser(String fileName)
fileName - The name of the file we want to parse.| Method Detail |
protected Long[] findTitleAndHisSubTitles(long startPosition)
startPosition - The position of the file pointer.protected void findSubTitles(Vector titleVector)
titleVector - The vector in which the position of the title and the subtitles are.protected Vector findAllParagraphs()
protected MyMenu createSubTitleMenu(long startPosition,
long stopPosition)
startPosition - The start position of the file pointer.stopPosition - The stop position of the file pointer.MyMenu
protected MyMenu[] createSubTitlesMenu(Long[] position,
long lastValue)
position - The array containing the all the different position of submenu in a main menu.lastValue - The last position of the subtitles in a file.MyMenu
protected MyMenu createTitleMenu(long startPosition,
long stopPosition,
MyMenu[] mySubMenu)
startPosition - The start position of the file pointer.stopPosition - The stop position of the file pointer.mySubMenu - The structure of submenu of the main menu.MyMenu
protected MyMenu createTitleMenu(long startPosition,
long stopPosition)
startPosition - The start position of the file pointer.stopPosition - The stop position of the file pointer.MyMenuprotected MyMenu[] createAllMenus()
MyMenu
protected void writeStructure(String fileName,
MyMenu[] menu)
fileName - The name of the file we want to write the structure into.menu - The structure containing all the menu.MyMenuprotected MyMenu[] readStructure(String fileName)
fileName - The name of the file we want to read the structure.MyMenupublic static void main(String[] args)
args - The argument of the command line.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||