Skip to content

Commit

Permalink
NSData: Dont add deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
spevans committed Oct 31, 2017
1 parent 4b53d4c commit 093578e
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions Foundation/NSData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,6 @@ open class NSData : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
}
}

@available(*, deprecated)
/// Initializes a data object with the contents of the mapped file specified by a given path.
public init?(contentsOfMappedFile path: String) {
NSUnimplemented()
}

@available(*, deprecated)
/// Creates and returns a data object from the mapped file at a given path.
class func dataWithContentsOfMappedFile(_ path: String) -> Any? {
NSUnimplemented()
}

/// Initializes a data object with the contents of another data object.
public init(data: Data) {
super.init()
Expand Down Expand Up @@ -245,12 +233,6 @@ open class NSData : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
_init(bytes: UnsafeMutableRawPointer(mutating: decodedBytes), length: decodedBytes.count, copy: true)
}

@available(*, deprecated)
/// Initializes a data object initialized with the given Base64 encoded string.
public init?(base64Encoding base64String: String) {
NSUnimplemented()
}

/// Initializes a data object with the given Base64 encoded data.
public init?(base64Encoded base64Data: Data, options: Base64DecodingOptions = []) {
var encodedBytes = [UInt8](repeating: 0, count: base64Data.count)
Expand Down Expand Up @@ -743,13 +725,6 @@ open class NSData : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
return Data(bytes: encodedBytes, count: encodedBytes.count)
}

@available(*, deprecated)
/// Initializes a Base64 encoded String from the data object.
/// Deprecated: You should transition to either base64EncodedString(options:) or base64EncodedData(options:)
func base64Encoding() -> String {
return base64EncodedString()
}

/// The ranges of ASCII characters that are used to encode data in Base64.
private static let base64ByteMappings: [Range<UInt8>] = [
65 ..< 91, // A-Z
Expand Down

0 comments on commit 093578e

Please sign in to comment.