Package com.amazon.s3shell

Examples of com.amazon.s3shell.S3Store


        User user = getCurrentUser();
        return user == null ? null : user.getEmail();
    }
   
    public static String storeFile(String id, String mimetype, final byte[] bytes) throws IOException {
        S3Store store = S3Store.getInstance();
        Map<String, List<String>> headers = new HashMap<String, List<String>>();
        headers.put("Content-Type", new ArrayList<String>());
        headers.get("Content-Type").add(mimetype);
        if (store.storeItem(id, bytes, ACLConstants.PUBLIC_READ, headers)) {
            return String.format("http://%s/%s/%s", store.getHost(), store.getBucket(), id);
        } else {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of com.amazon.s3shell.S3Store

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.