System.out.println("Unable to find file " + args[args.length -1]);
System.exit(0);
}
try {
PutObjectInline request = new PutObjectInline();
request.setBucket(params.get("bucket"));
request.setKey(params.get("name"));
request.setContentLength(file.length());
request.setAWSAccessKeyId("TODO");
request.setCredential("TODO");
request.setSignature("TODO");
request.setTimestamp(Calendar.getInstance());
request.setData(new DataHandler(file.toURL()));
PutObjectInlineResponse response = serviceStub.putObjectInline(request);
System.out.println("Object has been posted successfully. ETag: " + response.getPutObjectInlineResponse().getETag());
} catch(Exception e) {
System.out.println("Failed to execute object-put-inline due to " + e.getMessage());