Skip to content

wenbai/ocsg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

there is two ways to upload/download files from ocsg.

  1. java API usage:

    Configuration conf = TableConfigruation.getConf();
    OutputStream out = ...;
    Download download = DownloadFactory.getDownload(conf, path);
    download.write(out);
    download.close();
    out.close();

    InputStream in = ...;
    Upload upload = UploadFactory.getInstance(fileSize, THRESTHOLD);
    String returnPath = upload.upload(conf, in, fileName, fileSize);
    in.close();

  2. java HTTP Client usage:

    Client client = new Client();
    client.upload(uploadUrl, in, fileLength, fileName);
    in.close();

    DownloadResponse response = client.download(downloadUrl, filePath);
    InputStream in = response.getInputStream();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%