fm.liveswitch.HttpFileTransfer Class Reference

Helper methods for downloading binary files. More...

Public Member Functions

 HttpFileTransfer ()
 

Static Public Member Functions

static fm.liveswitch.Future< fm.liveswitch.DataBufferdownloadFile (String url)
 Downloads a file from the url. More...
 
static fm.liveswitch.Future< Object > downloadFile (String url, final String filePath)
 Downloads a file from the url. More...
 

Detailed Description

Helper methods for downloading binary files.

Constructor & Destructor Documentation

◆ HttpFileTransfer()

fm.liveswitch.HttpFileTransfer.HttpFileTransfer ( )

Member Function Documentation

◆ downloadFile() [1/2]

static fm.liveswitch.Future<fm.liveswitch.DataBuffer> fm.liveswitch.HttpFileTransfer.downloadFile ( String  url)
static

Downloads a file from the url.

Decompresses using BZip2 if needed.

Parameters
urlThe URL.

◆ downloadFile() [2/2]

static fm.liveswitch.Future<Object> fm.liveswitch.HttpFileTransfer.downloadFile ( String  url,
final String  filePath 
)
static

Downloads a file from the url.

Decompresses using BZip2 if needed. Then saves to the file system at filePath.

Parameters
urlThe URL.
filePathThe file path.