1
0
mirror of https://github.com/Rogiel/httpchannel synced 2025-12-06 07:32:50 +00:00

Fixes site deployment configuration and updades README file

This commit is contained in:
2012-01-23 00:47:11 -02:00
parent bcb9f6dbca
commit 4efdcd2e18
3 changed files with 12 additions and 17 deletions

11
README.md Normal file
View File

@@ -0,0 +1,11 @@
The HttpChannel library is a library that povides downloading and uploading capabilities to several share-sites (such as MegaUpload and FileSonic).
Obviously, the API supports a lot more services, but those are the most commonly used. Aside from that, the biggest point of the library is its simple usage, you don't need to use any customized API to perform download or uploads, you simply use the standard Java NIO Channels for both upload and download.
final UploadService<?> service = Services.getUploadService("megaupload");
final Uploader<?> uploader = UploadServices.upload(service, Path.get("test-file.txt"));
final UploadChannel channel = uploader.openChannel();
// now, you can perform any operation you want with this channel! Lets copy its data
ChannelUtils.copy(inputChannel, channel);
// this may take some time, it will finish the upload and generate the download link
channel.close();
System.out.println("Download Link: "+channel.getDownloadLink());