Package com.snda.everbox.sdk.proxy

Examples of com.snda.everbox.sdk.proxy.EverBoxJsonProxy


    sb = new StringBuilder();
    FS.thumbnail(obj, sb);
    System.out.println(sb);
    JSONObject thumbnailInfo = new JSONObject(sb.toString());
    System.out.println(thumbnailInfo.get("url"));
    byte[] data = new EverBoxJsonProxy().CallGetBytes(thumbnailInfo.getString("url"));
    System.out.println(data.length);
    FileOutputStream fos = new FileOutputStream("download.data");
    fos.write(data);
    fos.flush();
    fos.close();
View Full Code Here


        for (int i = 0; i < infos.size(); i++) {
          EverboxUploadInfo info = infos.get(i);
          log.infof("开始上传第%d段",info.getIndex());
          raf.seek(info.getIndex() * Constants.FILE_CHUNK_SIZE);
          sb = new StringBuilder();
          EverBoxJsonProxy ebjp = new EverBoxJsonProxy();
          if(info.getIndex() + 1 < part) {
            rc = ebjp.CallPostFileStream(info.getUrl(), raf, Constants.FILE_CHUNK_SIZE, sb, new UploadProgressListener());
          } else {
            rc = ebjp.CallPostFileStream(info.getUrl(), raf, (int)lastPartsize, sb, new UploadProgressListener());
          }

          if(rc != 200) {
            log.info("上传出错啦!! "+ sb.toString() + " " + ebo.getPath());
            return;
View Full Code Here

  public static int mkidrRemote(EverBoxObject ebo) throws Throwable{
    System.out.println("创建远程文件夹 "+ebo.getPath());
    JSONObject jo = new JSONObject();
    jo.put("path", ebo.getPath());
    jo.put("editTime", ebo.getEditTime());
    EverBoxJsonProxy ebjp = new EverBoxJsonProxy();
    StringBuilder sb = new StringBuilder();
    int rc = ebjp.CallPost(EverBoxServiceURLs.META_SERVER + "/mkdir", jo, "UTF-8", sb);
    if(rc != 200)
      EverboxContext.registerFileConflict(ebo);
    return rc;
  }
View Full Code Here

  }
 
  public static void deleteRemote(EverBoxObject ebo) throws Throwable {
    JSONObject jo = new JSONObject();
    jo.put("paths", new Object[]{ebo.getPath()});
    EverBoxJsonProxy ebjp = new EverBoxJsonProxy();
    StringBuilder sb = new StringBuilder();
    ebjp.CallPost("/delete", jo, "UTF-8", sb);
  }
View Full Code Here

TOP

Related Classes of com.snda.everbox.sdk.proxy.EverBoxJsonProxy

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.