Package org.robovm.apple.foundation
Class NSURL
java.lang.Object
org.robovm.rt.bro.NativeObject
org.robovm.objc.ObjCObject
org.robovm.apple.foundation.NSObject
org.robovm.apple.foundation.NSURL
- All Implemented Interfaces:
NSCoding,NSItemProviderReading,NSItemProviderWriting,NSObjectProtocol,NSSecureCoding,ObjCProtocol
public class NSURL extends NSObject implements NSSecureCoding, NSItemProviderReading, NSItemProviderWriting
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNSURL.NSURLPtrNested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInitNested classes/interfaces inherited from class org.robovm.objc.ObjCObject
ObjCObject.ObjCObjectPtr, ObjCObject.Super -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description NSURL()NSURL(File file)NSURL(File file, boolean isDir)NSURL(String URLString)NSURL(String scheme, String host, String path)Deprecated.Deprecated in iOS 9.0.NSURL(String URLString, NSURL baseURL)NSURL(URI uri)NSURL(URL url)NSURL(NSCoder coder)NSURL(NSData data, NSURL baseURL)NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL)NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL, BooleanPtr isStale)NSURL(NSData data, NSURL baseURL, boolean absoluteURL)protectedNSURL(NSObject.Handle h, long handle)protectedNSURL(NSObject.SkipInit skipInit)NSURL(NSURLScheme scheme, String host, String path) -
Method Summary
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValuesMethods inherited from class org.robovm.objc.ObjCObject
addStrongRef, dispose, dispose, finalize, getAssociatedObject, getObjCClass, getPeerObject, getSuper, initObject, logRetainRelease, removeStrongRef, retainCustomObjectFromCb, setAssociatedObject, toObjCObject, toObjCObject, updateStrongRef
-
Constructor Details
-
NSURL
-
NSURL
public NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL) throws NSErrorException- Throws:
NSErrorException
-
NSURL
public NSURL() -
NSURL
-
NSURL
-
NSURL
Deprecated.Deprecated in iOS 9.0. Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings. -
NSURL
-
NSURL
-
NSURL
- Since:
- Available in iOS 9.0 and later.
-
NSURL
public NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL, BooleanPtr isStale) throws NSErrorException- Throws:
NSErrorException
-
NSURL
-
NSURL
- Since:
- Available in iOS 9.0 and later.
-
NSURL
-
NSURL
-
NSURL
-
NSURL
-
-
Method Details
-
getDataRepresentation
- Since:
- Available in iOS 9.0 and later.
-
getAbsoluteString
-
getRelativeString
-
getBaseURL
-
getAbsoluteURL
-
getScheme
-
getResourceSpecifier
-
getHost
-
getPort
-
getUser
-
getPassword
-
getPath
-
getFragment
-
getParameterString
Deprecated.Deprecated in iOS 13.0. The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them. -
getQuery
-
getRelativePath
-
hasDirectoryPath
public boolean hasDirectoryPath()- Since:
- Available in iOS 9.0 and later.
-
isFileURL
public boolean isFileURL() -
getStandardizedURL
-
getFilePathURL
-
getPathComponents
-
getLastPathComponent
-
getPathExtension
-
getURLByDeletingLastPathComponent
-
getURLByDeletingPathExtension
-
getURLByStandardizingPath
-
getURLByResolvingSymlinksInPath
-
supportsSecureCoding
public static boolean supportsSecureCoding() -
getReadableTypeIdentifiersForItemProvider
-
getWritableTypeIdentifiersForItemProvider0
-
getWritableTypeIdentifiersForItemProvider
- Specified by:
getWritableTypeIdentifiersForItemProviderin interfaceNSItemProviderWriting
-
toURL
- Throws:
MalformedURLException
-
toURI
- Throws:
URISyntaxException
-
encodeURLString
-
decodeURLString
-
getResourceValue
- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
getResourceValue
- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
getResourceValue
- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
getResourceValue
- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
removeCachedResourceValue
- Since:
- Available in iOS 7.0 and later.
-
removeCachedResourceValue
- Since:
- Available in iOS 7.0 and later.
-
removeCachedResourceValue
- Since:
- Available in iOS 7.0 and later.
-
removeCachedResourceValue
- Since:
- Available in iOS 7.0 and later.
-
setResourceValue
public void setResourceValue(NSURLFileSystemProperty property, NSObject value) throws NSErrorException- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
setResourceValue
- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
setResourceValue
- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
setResourceValue
public void setResourceValue(NSURLUbiquitousItemProperty property, NSObject value) throws NSErrorException- Throws:
NSErrorException- Since:
- Available in iOS 4.0 and later.
-
setTemporaryResourceValue
- Since:
- Available in iOS 7.0 and later.
-
setTemporaryResourceValue
- Since:
- Available in iOS 7.0 and later.
-
setTemporaryResourceValue
- Since:
- Available in iOS 7.0 and later.
-
setTemporaryResourceValue
- Since:
- Available in iOS 7.0 and later.
-
getPromisedItemResourceValue
- Throws:
NSErrorException- Since:
- Available in iOS 8.0 and later.
-
init
Deprecated.Deprecated in iOS 9.0. Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings. -
initFileURL
- Since:
- Available in iOS 9.0 and later.
-
initFileURL
- Since:
- Available in iOS 9.0 and later.
-
initFileURL
-
initFileURL
-
init
-
init
-
init
- Since:
- Available in iOS 9.0 and later.
-
initAbsoluteURL
- Since:
- Available in iOS 9.0 and later.
-
getFileSystemRepresentation
-
checkResourceIsReachable
- Throws:
NSErrorException
-
isFileReferenceURL
public boolean isFileReferenceURL() -
getFileReferenceURL
-
getResourceValues
- Throws:
NSErrorException
-
setResourceValue
- Throws:
NSErrorException
-
setResourceValues
- Throws:
NSErrorException
-
removeCachedResourceValue
-
removeAllCachedResourceValues
public void removeAllCachedResourceValues() -
setTemporaryResourceValue
-
toBookmarkData
public NSData toBookmarkData(NSURLBookmarkCreationOptions options, List<NSURLProperty> keys, NSURL relativeURL) throws NSErrorException- Throws:
NSErrorException
-
startAccessingSecurityScopedResource
public boolean startAccessingSecurityScopedResource() -
stopAccessingSecurityScopedResource
public void stopAccessingSecurityScopedResource() -
getResourceValuesFromBookmarkData
public static NSURLProperties getResourceValuesFromBookmarkData(List<NSURLProperty> keys, NSData bookmarkData) -
writeBookmarkData
public static boolean writeBookmarkData(NSData bookmarkData, NSURL bookmarkFileURL, NSURLBookmarkCreationOptions options) throws NSErrorException- Throws:
NSErrorException
-
createBookmarkData
- Throws:
NSErrorException
-
getPromisedItemResourceValue
public boolean getPromisedItemResourceValue(NSObject.NSObjectPtr value, NSString key) throws NSErrorException- Throws:
NSErrorException
-
getPromisedItemResourceValues
public NSURLProperties getPromisedItemResourceValues(List<NSURLProperty> keys) throws NSErrorException- Throws:
NSErrorException
-
isPromisedItemReachable
- Throws:
NSErrorException
-
newURLByAppendingPathComponent
-
newURLByAppendingPathComponent
-
newURLByAppendingPathExtension
-
encode
-
init
-
createProviderDataObject
public static NSURL createProviderDataObject(NSData data, String typeIdentifier) throws NSErrorException- Throws:
NSErrorException
-
getItemProviderVisibility
- Specified by:
getItemProviderVisibilityin interfaceNSItemProviderWriting
-
loadData
- Specified by:
loadDatain interfaceNSItemProviderWriting
-
getItemProviderVisibility0
public static NSItemProviderRepresentationVisibility getItemProviderVisibility0(String typeIdentifier)
-