Class FileRead

java.lang.Object
com.bluersw.source.FileRead
All Implemented Interfaces:
DataSource

public class FileRead extends Object implements DataSource
文件读取类 File reading class
Author:
sunweisheng
  • Constructor Details

    • FileRead

      public FileRead(String filePath)
      构建函数 Constructor
      Parameters:
      filePath - 文件路径 file path
  • Method Details

    • get

      public String get() throws Exception
      Description copied from interface: DataSource
      获取数据 retrieve data
      Specified by:
      get in interface DataSource
      Returns:
      获取数据的字符串结果 Get string result of data
      Throws:
      Exception - 与IO异常相关 Related to IO exception
    • getStatusLine

      public String getStatusLine()
      Description copied from interface: DataSource
      获取执行结果状态的字符串说明 Get string description of execution result status
      Specified by:
      getStatusLine in interface DataSource
      Returns:
      执行结果状态的字符串说明 String description of execution result status
    • getStatusCode

      public int getStatusCode()
      Description copied from interface: DataSource
      获取执行结果状态码 Get execution result status code
      Specified by:
      getStatusCode in interface DataSource
      Returns:
      执行结果状态码,成功统一用200表示 Execution result status code, successfully expressed by 200