MetricStream interview question

Write code in Java to upload and download file?