Package com.jugubell.bproccli.files
Class ReadAssemblerFile
java.lang.Object
com.jugubell.bproccli.files.ReadAssemblerFile
Class for the assembler file reading.
- Author:
- Jugurtha Bellagh
-
Constructor Summary
ConstructorsConstructorDescriptionReadAssemblerFile(String filePath) Constructor for theReadAssemblerFileclass. -
Method Summary
Modifier and TypeMethodDescriptionbooleanreadFile()Method for reading the file, the extension should be '.bpasm' Writes the file content intofileDataUsestrimFile()to trim the file content.voidsetFilePath(String filePath) voidtrimFile()Trims the file content and store the trimmed content and stores the trimmed data intrimmedData.
-
Constructor Details
-
ReadAssemblerFile
Constructor for theReadAssemblerFileclass.- Parameters:
filePath- path of the file to read asString
-
-
Method Details
-
readFile
public boolean readFile()Method for reading the file, the extension should be '.bpasm' Writes the file content intofileDataUsestrimFile()to trim the file content.- Returns:
- boolean true if read success
-
getFilePath
-
getTrimmedData
-
setFilePath
-
trimFile
public void trimFile()Trims the file content and store the trimmed content and stores the trimmed data intrimmedData. It removes comments (starting with ';') It removes extra spaces. Uppercases everything.
-