記錄檔

public class LogFile
extends Object

java.lang.Object
   ↳ com.android.tradefed.result.LogFile


此類別可保留所儲存記錄檔的中繼資料。

摘要

公用建構函式

LogFile(String path, String url, LogDataType type)

使用檔案路徑、網址和 LogDataType 中繼資料建構 LogFile

LogFile(String path, String url, boolean isCompressed, LogDataType type, long size)

使用檔案路徑、網址和 LogDataType 中繼資料建構 LogFile

公用方法

String getPath()

取得絕對路徑。

long getSize()

取得記錄檔的大小。

LogDataType getType()

取得已記錄檔案的 LogDataType

String getUrl()

取得可存取已儲存檔案的網址。

boolean isCompressed()

瞭解檔案是否經過壓縮。

boolean isText()

確認檔案是否能顯示為文字。

公用建構函式

記錄檔

public LogFile (String path, 
                String url, 
                LogDataType type)

使用檔案路徑、網址和 LogDataType 中繼資料建構 LogFile

參數
path String:已儲存檔案的絕對路徑。

url String:可以存取已儲存檔案的網址。

type LogDataType:已記錄檔案的 LogDataType

記錄檔

public LogFile (String path, 
                String url, 
                boolean isCompressed, 
                LogDataType type, 
                long size)

使用檔案路徑、網址和 LogDataType 中繼資料建構 LogFile。變化版本 的 LogFile#LogFile(String, String, LogDataType),其中可設定壓縮狀態 因為在某些情況下,我們會手動壓縮檔案,但必須 追蹤目的原始類型

參數
path String:已儲存檔案的絕對路徑。

url String:可以存取已儲存檔案的網址。

isCompressed boolean:檔案是否經過壓縮。

type LogDataType:已記錄檔案的 LogDataType

size long:已記錄檔案的大小,以位元組為單位。

公用方法

getPath

public String getPath ()

取得絕對路徑。

傳回
String

getSize

public long getSize ()

取得記錄檔的大小。

傳回
long

getType

public LogDataType getType ()

取得已記錄檔案的 LogDataType

傳回
LogDataType

getUrl

public String getUrl ()

取得可存取已儲存檔案的網址。

傳回
String

已壓縮

public boolean isCompressed ()

瞭解檔案是否經過壓縮。

傳回
boolean

isText

public boolean isText ()

確認檔案是否能顯示為文字。

傳回
boolean