GCSFileUploader

public class GCSFileUploader
extends GCSCommon

java.lang.Object
   ↳ com.android.tradefed.util.GCSCommon
     ↳ com.android.tradefed.util.GCSFileUploader


โปรแกรมอัปโหลดไฟล์เพื่ออัปโหลดข้อมูลไฟล์ไปยัง Google Cloud Storage (GCS)

สรุป

ตัวสร้างแบบสาธารณะ

GCSFileUploader(File jsonKeyFile)
GCSFileUploader()

เมธอดสาธารณะ

void uploadFile(String bucketName, String gcsFilename, InputStream fileContents, String contentType, boolean allowOverwrite)

อัปโหลดข้อมูลไปยังไฟล์ที่เก็บข้อมูล GCS

ตัวสร้างแบบสาธารณะ

GCSFileUploader

public GCSFileUploader (File jsonKeyFile)

พารามิเตอร์
jsonKeyFile File

GCSFileUploader

public GCSFileUploader ()

เมธอดสาธารณะ

uploadFile

public void uploadFile (String bucketName, 
                String gcsFilename, 
                InputStream fileContents, 
                String contentType, 
                boolean allowOverwrite)

อัปโหลดข้อมูลไปยังไฟล์ที่เก็บข้อมูล GCS gs://[ชื่อที่เก็บข้อมูล]/[ชื่อไฟล์ GCS]

พารามิเตอร์
bucketName String: ชื่อที่เก็บข้อมูล GCS

gcsFilename String: ชื่อไฟล์

fileContents InputStream: InputStream ของข้อมูลที่เขียนลงในไฟล์ GCS

contentType String: คือประเภทสื่อ MIME ของออบเจ็กต์ที่อัปโหลด

allowOverwrite boolean: True จะอนุญาตให้เมธอดนี้เขียนทับไฟล์ใน GCS