Inherits from NSObject
Declared in OSSTool.h
OSSTool.m

Overview

@class

Class Methods

buildErrorFromException:

将exception构建成NSError

+ (NSError *)buildErrorFromException:(NSException *)exception

Discussion

@method

Declared In

OSSTool.h

buildErrorFromResponse:withResponseData:

使用response和responseData构建错误信息

+ (NSError *)buildErrorFromResponse:(NSHTTPURLResponse *)response withResponseData:(NSData *)responseData

Discussion

@method

Declared In

OSSTool.h

buildErrorWithString:

从一个字符串构造一个NSError

+ (NSError *)buildErrorWithString:(NSString *)errorInfo

Discussion

@method

Declared In

OSSTool.h

buildExceptionFromError:

将error构建成NSException

+ (NSException *)buildExceptionFromError:(NSError *)error

Discussion

@method

Declared In

OSSTool.h

buildExceptionWithString:

从一个字符串构造一个NSException

+ (NSException *)buildExceptionWithString:(NSString *)errorInfo

Discussion

@method

Declared In

OSSTool.h

calBase64Sha1WithData:withKey:

实现HMAC-SHA1签名再Base64转码

+ (NSString *)calBase64Sha1WithData:(NSString *)data withKey:(NSString *)key

Discussion

@method

Declared In

OSSTool.h

calMd5SumWithData:

计算md5值

+ (NSString *)calMd5SumWithData:(NSString *)data

Discussion

@method

Declared In

OSSTool.h

clearMemory:

删除持久化内容

+ (void)clearMemory:(OSSMultipart *)multipart

Discussion

@method

Declared In

OSSTool.h

dataMD5:

计算NSString对象的md5

+ (NSString *)dataMD5:(NSString *)stringData

Discussion

@method

Declared In

OSSTool.h

executeHttpHeadRequest:::

执行http请求并将应答的head返回

+ (NSDictionary *)executeHttpHeadRequest:(NSMutableURLRequest *)request :

Discussion

@method

Declared In

OSSTool.h

executeHttpRequest:::

执行http请求

+ (NSData *)executeHttpRequest:(NSMutableURLRequest *)request :

Discussion

@method

Declared In

OSSTool.h

fileMD5:

计算large file的md5

+ (NSString *)fileMD5:(NSString *)path

Discussion

@method

Declared In

OSSTool.h

getGMTString

计算GMT格式时间

+ (NSString *)getGMTString

Discussion

@method

Declared In

OSSTool.h

isCname:

判断域名是否为cname

+ (BOOL)isCname:(NSString *)string

Discussion

@method

Declared In

OSSTool.h

isEmptyString:

如果字符串是nil或长度为0则返回true

+ (BOOL)isEmptyString:(NSString *)str

Discussion

@method

Declared In

OSSTool.h

isLegalRangeFrom:to:

判断一个数据范围是否合法

+ (BOOL)isLegalRangeFrom:(long)begin to:(long)end

Discussion

@method

Declared In

OSSTool.h

isNeedAddAuthWithRequest:andBucket:

判断是否需要加签操作

+ (BOOL)isNeedAddAuthWithRequest:(NSMutableURLRequest *)request andBucket:(OSSBucket *)bucket

Discussion

@method

Declared In

OSSTool.h

largeDataMD5:

计算large data的md5

+ (NSString *)largeDataMD5:(NSData *)data

Discussion

@method

Declared In

OSSTool.h

parseErrorResponseXML:intoDic:

将解析到的错误XML返回数据进行解析并写入到字典errorInfo

+ (void)parseErrorResponseXML:(NSData *)responseData intoDic:(NSMutableDictionary **)errorInfo

Discussion

@method

Declared In

OSSTool.h

printResponseCodeData:andData:

打印返回的数据和状态码

+ (void)printResponseCodeData:(NSHTTPURLResponse *)response andData:(NSData *)data

Discussion

@method

Declared In

OSSTool.h

sortArray:

对数组进行字典排序

+ (NSArray *)sortArray:(NSArray *)array

Discussion

@method

Declared In

OSSTool.h

trimString:withCharactersInString:

将传入的字符串两端的空格删除

+ (NSString *)trimString:(NSString *)string withCharactersInString:(NSString *)characters

Discussion

@method

Declared In

OSSTool.h

urlEncode:

对url重新编码

+ (NSString *)urlEncode:(NSString *)url

Discussion

@method

Declared In

OSSTool.h