This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static NSString *cacheDatabaseName = @"ApplicationCache.db"; | |
static NSString *cacheGroupTable = @"CacheGroups"; | |
static NSString *cacheGroupTableManifestURLColums = @"manifestURL"; | |
static NSString *cacheTable = @"Caches"; | |
static NSString *cacheTableCacheGroupId = @"cacheGroup"; | |
/** | |
Clears the cached resources associated to a cache group. | |
@param manifestURLs An array of `NSString` containing the URLs of the cache manifests for which you want to clear the resources. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/// An abstract class that makes building simple asynchronous operations easy. | |
/// Subclasses must implement `execute()` to perform any work and call | |
/// `finish()` when they are done. All `NSOperation` work will be handled | |
/// automatically. | |
open class AsynchronousOperation: Operation { | |
// MARK: - Properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
class StreamReader { | |
let encoding : UInt | |
let chunkSize : Int | |
var atEof : Bool = false | |
var fileHandle : NSFileHandle! | |
let buffer : NSMutableData! |