Examples of WeiboException


Examples of weibo4j.model.WeiboException

      expireIn = json.getString("expires_in");
      // Fix issue #1, see https://github.com/belerweb/weibo4j/issues/1
      // refreshToken = json.getString("refresh_token");
      uid = json.getString("uid");
    } catch (JSONException je) {
      throw new WeiboException(je.getMessage() + ":" + json.toString(), je);
    }
  }
View Full Code Here

Examples of weibo4j.model.WeiboException

  public ImageItem(String name, byte[] content) throws WeiboException {
    String imgtype = null;
    try {
      imgtype = getContentType(content);
    } catch (IOException e) {
      throw new WeiboException(e);
    }

    if (imgtype != null
        && (imgtype.equalsIgnoreCase("image/gif") || imgtype.equalsIgnoreCase("image/png") || imgtype
            .equalsIgnoreCase("image/jpeg"))) {
      this.content = content;
      this.name = name;
      this.contentType = imgtype;
    } else {
      throw new WeiboException("Unsupported image type, Only Suport JPG ,GIF,PNG!");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.