0
誰能告訴我如何讀取多行並存儲它們的值。閱讀文件上傳中的多行
例如:file.txt的
Probable Cause: The network operator has issued an alter attribute command for
the specified LCONF assign. The old value and the new value are show
Action Taken : The assign value is changed from the old value to the new
value. Receipt of this message does not guarantee that the new attribute
value was accepted by clients who use it. Additional messages may be.
Probable Cause: The network operator has issued an info attribute command for
the specified LCONF assign. The default value being used is displaye
Action Taken : None. Informational use only.
在上面的文件,可能的原因和採取的行動是一個數據庫表中的列。在可能的原因之後:這些值是存儲在數據庫表中的可能原因列的值,與採取的操作相同。
那麼如何讀取多行並存儲它們的值呢?我必須閱讀可能的原因的值,直到該行帶有Action Taken。我正在使用BufferedReader
和readLine()
方法一次讀取一行。那麼,誰能告訴我如何從可能的原因直接讀取行動,無論他們之間有多少行。