Package com.google.jplurk.net

Examples of com.google.jplurk.net.ThinMultipartEntity


            throw new PlurkException("not a valid file: " + file);
        }

        HttpPost method = new HttpPost("http://www.plurk.com/API/Users/updatePicture");
        try {
            ThinMultipartEntity entity = new ThinMultipartEntity();
            entity.addPart("api_key", config.getApiKey());
            entity.addPart("profile_image", file);
            method.setEntity(entity);
            return JsonUtils.toObject(executor.execute(method));
        } catch (Exception e) {
            throw PlurkException.create(e);
        }
View Full Code Here


     */
    public JSONObject updatePicture(String fileName, InputStream inputStream) throws PlurkException {

        HttpPost method = new HttpPost("http://www.plurk.com/API/Users/updatePicture");
        try {
            ThinMultipartEntity entity = new ThinMultipartEntity();
            entity.addPart("api_key", config.getApiKey());
            entity.addPart("profile_image", fileName, inputStream);
            method.setEntity(entity);
            return JsonUtils.toObject(executor.execute(method));
        } catch (Exception e) {
            throw PlurkException.create(e);
        }
View Full Code Here

            return null;
        }

        HttpPost method = new HttpPost("http://www.plurk.com/API/Timeline/uploadPicture");
        try {
            ThinMultipartEntity entity = new ThinMultipartEntity();
            entity.addPart("api_key", config.getApiKey());
            entity.addPart("image", file);
            method.setEntity(entity);

            return JsonUtils.toObject(executor.execute(method));
        } catch (Exception e) {
            throw PlurkException.create(e);
View Full Code Here

     */
    public JSONObject uploadPicture(String fileName, InputStream inputStream) throws PlurkException {

        HttpPost method = new HttpPost("http://www.plurk.com/API/Timeline/uploadPicture");
        try {
            ThinMultipartEntity entity = new ThinMultipartEntity();
            entity.addPart("api_key", config.getApiKey());
            entity.addPart("image", fileName, inputStream);
            method.setEntity(entity);

            return JsonUtils.toObject(executor.execute(method));
        } catch (Exception e) {
            throw PlurkException.create(e);
View Full Code Here

TOP

Related Classes of com.google.jplurk.net.ThinMultipartEntity

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.