erd3erd3_个人页

个人头像照片 erd3erd3
个人头像照片
0
15
0

个人介绍

暂无个人介绍

擅长的技术

获得更多能力
通用技术能力:

暂时未有相关通用技术能力~

云产品技术能力:

阿里云技能认证

详细说明
暂无更多信息
正在加载, 请稍后...
暂无更多信息
  • 回答了问题 2014-07-02

    大神ossbrowser正在运行什么情况

    Re大神ossbrowser正在运行什么情况 应该是进程还没真正退出吧,在windows进程管理器里找到javaw,杀掉应该就可以了
    踩0 评论0
  • 回答了问题 2012-10-08

    OSS存储服务-客户端工具

    回38楼danceringcn的帖子 右键ossbrowser右侧的文件管理里的文件夹,在弹出菜单里可以选同步到本地的某个文件夹,然后就可以在本地发生变化时,同步到oss,不过利用这个功能同步会多浪费请求数
    踩0 评论0
  • 回答了问题 2012-08-01

    菜鸟求EXE格式的FTP上传程序

    Re菜鸟求EXE格式的FTP上传程序 右键ossbrowser.jar 打开方式 -java(TM) paltform SE binray 或者直接把jar的默认打开方式改成这个
    踩0 评论0
  • 回答了问题 2012-03-29

    如何做上传进度?

    你用的是什么语言开发的?如果是java的话,可以继承一个inputstream在里面实现一些和进度相关的处理,然后将该inputstream传给putObject就可以实现了,下面是简单的代码示例: public class ProgressReportingInputStream extends FilterInputStream {    private static final int NOTIFICATION_THRESHOLD = 8 * Constants.KB;    private final ProgressListener listener;        private int unnotifiedByteCount;    public ProgressReportingInputStream(final InputStream in, final ProgressListener listener) {        super(in);        this.listener = listener;    }    @Override    public int read() throws IOException {        int data = super.read();        if (data != -1) notify(1);        return data;    }    @Override    public int read(byte[] b, int off, int len) throws IOException {        int bytesRead = super.read(b, off, len);        if (bytesRead != -1) notify(bytesRead);        return bytesRead;    }    @Override    public void close() throws IOException {        if (unnotifiedByteCount > 0) {            listener.progressChanged(new ProgressEvent(unnotifiedByteCount));            unnotifiedByteCount = 0;        }        super.close();    }        private void notify(int bytesRead) {        unnotifiedByteCount  = bytesRead;        if (unnotifiedByteCount >= NOTIFICATION_THRESHOLD) {            listener.progressChanged(new ProgressEvent(unnotifiedByteCount));            unnotifiedByteCount = 0;        }    }        } public interface ProgressListener {    public void progressChanged(ProgressEvent progressEvent);} public class ProgressEvent {    public static final int DEFAULT_EVENT_CODE = 0;    public static final int STARTED_EVENT_CODE   = 1;    public static final int COMPLETED_EVENT_CODE = 2;    public static final int FAILED_EVENT_CODE    = 4;    public static final int CANCELED_EVENT_CODE  = 8;    private int bytesTransfered;        private int eventCode;        public ProgressEvent(int bytesTransfered) {        this.bytesTransfered = bytesTransfered;    }    public void setBytesTransfered(int bytesTransfered) {        this.bytesTransfered = bytesTransfered;    }    public int getBytesTransfered() {        return bytesTransfered;    }    public int getEventCode() {        return eventCode;    }    public void setEventCode(int eventType) {        this.eventCode = eventType;    }} public class ProgressListenerImp implements ProgressListener {    private final int SPEED_UPADATE_INTERVAL = 300;    private IconTableModel iconTableModel;    private String taskName;    private long totalSize = 0;    private long curSize = 0;    private long newUploadSize = 0;    private long lastTime = 0;    private String taskType;    private boolean isFailed = false;    @Override    public void progressChanged(ProgressEvent progressEvent) {        switch (progressEvent.getEventCode()) {        case ProgressEvent.DEFAULT_EVENT_CODE:            int ratio = -1,            speed = -1;            long curTime = new Date().getTime();            curSize  = progressEvent.getBytesTransfered();            newUploadSize  = progressEvent.getBytesTransfered();            if (totalSize > 0) {                ratio = (int) (curSize * 100 / totalSize);            }            if (curTime - lastTime > SPEED_UPADATE_INTERVAL) {                speed = (int) (newUploadSize * 1000 / (curTime - lastTime));                lastTime = curTime;                newUploadSize = 0;            }            if (!isFailed) {                iconTableModel.setValueAt(taskName, ratio, taskType, speed);            }            break;        case ProgressEvent.STARTED_EVENT_CODE:            iconTableModel.setValueAt(taskName, 0, taskType, 0);            lastTime = new Date().getTime();            break;        case ProgressEvent.COMPLETED_EVENT_CODE:            iconTableModel.setValueAt(taskName, 100, 'Completed', 0);            iconTableModel.removeTask(taskName);            break;        case ProgressEvent.CANCELED_EVENT_CODE:            iconTableModel.setValueAt(taskName, -1, 'Canceled', 0);            break;        case ProgressEvent.FAILED_EVENT_CODE:            isFailed = true;            iconTableModel.setValueAt(taskName, -1, 'Failed', 0);            break;        }    }    public ProgressListenerImp(ResourceManager resourceManager,            IconTableModel iconTableModel, String taskName, long totalSize,            int taskType) {        super();        this.iconTableModel = iconTableModel;        this.taskName = taskName;        this.totalSize = totalSize;        if (taskType == Utils.CREATE_FOLDER                || taskType == Utils.UPLOAD_FILE) {            this.taskType = 'Uploading';        } else {            this.taskType = 'Downloading';        }    }}
    踩0 评论0
  • 回答了问题 2012-03-06

    java上传文件后的返回判断是否上传成功

    如果上传失败会抛出异常,成功的话会在PutObjectResult里返回新创建的OSSObject的ETag值
    踩0 评论0
  • 回答了问题 2012-03-06

    OSS java版管理工具

    没有对单个线程的上传进行限速,应该是你网络或者带宽的原因吧 ------------------------- 之前写的时候还没有muli_part上传的功能,有空时我就把这个功能加上去
    踩0 评论0
  • 提交了问题 2012-03-02

    OSS java版管理工具

  • 回答了问题 2011-12-08

    请问如何做模拟多人连接资源测试//

    可以将bucket设为public-read,然后生成一个访问该文件的Url外链地址,通过该地址就可以进行多人连接资源测试了 ------------------------- String accessKeyId = '你的oss key';  //获取方式参考http://bbs.aliyun.com/read.php?tid=20345String secretAccessKey = '你的oss secret key';String bucket = 'test_bucket_name11';  //你的bucket名String object = 'abc/test.jpg';    //你上传到oss的object名,如 abc/test.jpgOSSClient oss = new OSSClient(accessKeyId, secretAccessKey);// 创建(或者将已有的bucket修改为)一个公开读写的bucketResponse response = oss.putBucketACL(bucket, Utils.ACL_PUBLIC_READ_WRITE);if (response.getStatusCode() / 100 != 2) {      System.out.println(response.getErrorMessage());} else {      System.out.println('Success');}// 上传一个文件response = oss.putObjectFromFile(bucket, object, 'd:/a.jpg');  //最后一个参数是你要上传的文件路径如d:/a.jpgif (response.getStatusCode() / 100 != 2) {     System.out.println(response.getErrorMessage());} else {     System.out.println('Success');}上面上传的文件你就可以通过storage.aliyun.com:8080/test_bucket_name11/abc/test.jpg 在任意电脑上进行访问了,如果不想要bucket是公开的,只想让你允许的用户进行访问,那么将bucket设为private,在你上传完文件后,用下面这段代码生成一个带授权的链接//生成带授权的链接int timeout = 10 * 60; //将生成的URL的有效时间设为10分钟String resource = '/' + bucket + '/' + object;String url = Utils.generateRequestUrl(accessKeyId, secretAccessKey, 'GET', resource, timeout);//通过下面的代码进行访问HttpMethod httpMethod = oss.accessByUrl('GET', url);InputStreamResponse inputStreamResponse = new InputStreamResponse(httpMethod);//通过inputStreamResponse.getInputStream()即可获得文件的输入流不过这种方式只能通过api进行访问了
    踩0 评论0
  • 回答了问题 2011-11-15

    拿到API后,使用python  SDK如何开始!?

    第一个问题应该是lib文件下的包没有导入造成的吧 Please examine OssTest.java and update it with your credentials是因为没有填上你自己的oss key和secret Key造成的,在如下两行代码里: static final String accessKeyId = ''; static final String secretAccessKey = ''; 需要换成你自己的key
    踩0 评论0
  • 回答了问题 2011-10-13

    签名算法

    看下字符串编码是不是utf8
    踩0 评论0
正在加载, 请稍后...
滑动查看更多
正在加载, 请稍后...
暂无更多信息