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
,org.robovm.objc.ObjCProtocol
public class NSURL extends NSObject implements NSSecureCoding, NSItemProviderReading, NSItemProviderWriting
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSURL.NSURLPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
-
Field Summary
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description NSURL()
NSURL(java.io.File file)
NSURL(java.io.File file, boolean isDir)
NSURL(java.lang.String URLString)
NSURL(java.lang.String scheme, java.lang.String host, java.lang.String path)
Deprecated.Deprecated in iOS 9.0.NSURL(java.lang.String URLString, NSURL baseURL)
NSURL(java.net.URI uri)
NSURL(java.net.URL url)
NSURL(NSCoder decoder)
NSURL(NSData data, NSURL baseURL)
NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL)
NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL, org.robovm.rt.bro.ptr.BooleanPtr isStale)
NSURL(NSData data, NSURL baseURL, boolean absoluteURL)
protected
NSURL(NSObject.Handle h, long handle)
protected
NSURL(NSObject.SkipInit skipInit)
NSURL(NSURLScheme scheme, java.lang.String host, java.lang.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, willChangeValues
-
-
-
-
Constructor Detail
-
NSURL
public NSURL(NSURLScheme scheme, java.lang.String host, java.lang.String path)
-
NSURL
public NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL) throws NSErrorException
- Throws:
NSErrorException
-
NSURL
public NSURL()
-
NSURL
protected NSURL(NSObject.Handle h, long handle)
-
NSURL
protected NSURL(NSObject.SkipInit skipInit)
-
NSURL
@Deprecated public NSURL(java.lang.String scheme, java.lang.String host, java.lang.String path)
Deprecated.Deprecated in iOS 9.0.- Since:
- Available in iOS 2.0 and later.
-
NSURL
public NSURL(java.lang.String URLString)
-
NSURL
public NSURL(java.lang.String URLString, NSURL baseURL)
-
NSURL
public NSURL(NSData bookmarkData, NSURLBookmarkResolutionOptions options, NSURL relativeURL, org.robovm.rt.bro.ptr.BooleanPtr isStale) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
NSURL
public NSURL(NSCoder decoder)
-
NSURL
public NSURL(NSData data, NSURL baseURL, boolean absoluteURL)
- Since:
- Available in iOS 9.0 and later.
-
NSURL
public NSURL(java.io.File file)
-
NSURL
public NSURL(java.io.File file, boolean isDir)
-
NSURL
public NSURL(java.net.URL url)
-
NSURL
public NSURL(java.net.URI uri)
-
-
Method Detail
-
getDataRepresentation
public NSData getDataRepresentation()
- Since:
- Available in iOS 9.0 and later.
-
getAbsoluteString
public java.lang.String getAbsoluteString()
-
getRelativeString
public java.lang.String getRelativeString()
-
getBaseURL
public NSURL getBaseURL()
-
getAbsoluteURL
public NSURL getAbsoluteURL()
-
getScheme
public java.lang.String getScheme()
-
getResourceSpecifier
public java.lang.String getResourceSpecifier()
-
getHost
public java.lang.String getHost()
-
getPort
public NSNumber getPort()
-
getUser
public java.lang.String getUser()
-
getPassword
public java.lang.String getPassword()
-
getPath
public java.lang.String getPath()
-
getFragment
public java.lang.String getFragment()
-
getParameterString
public java.lang.String getParameterString()
-
getQuery
public java.lang.String getQuery()
-
getRelativePath
public java.lang.String getRelativePath()
-
hasDirectoryPath
public boolean hasDirectoryPath()
- Since:
- Available in iOS 9.0 and later.
-
isFileURL
public boolean isFileURL()
-
getStandardizedURL
public NSURL getStandardizedURL()
-
getFilePathURL
public NSURL getFilePathURL()
- Since:
- Available in iOS 4.0 and later.
-
getPathComponents
public java.util.List<java.lang.String> getPathComponents()
- Since:
- Available in iOS 4.0 and later.
-
getLastPathComponent
public java.lang.String getLastPathComponent()
- Since:
- Available in iOS 4.0 and later.
-
getPathExtension
public java.lang.String getPathExtension()
- Since:
- Available in iOS 4.0 and later.
-
getURLByDeletingLastPathComponent
public NSURL getURLByDeletingLastPathComponent()
- Since:
- Available in iOS 4.0 and later.
-
getURLByDeletingPathExtension
public NSURL getURLByDeletingPathExtension()
- Since:
- Available in iOS 4.0 and later.
-
getURLByStandardizingPath
public NSURL getURLByStandardizingPath()
- Since:
- Available in iOS 4.0 and later.
-
getURLByResolvingSymlinksInPath
public NSURL getURLByResolvingSymlinksInPath()
- Since:
- Available in iOS 4.0 and later.
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
getReadableTypeIdentifiersForItemProvider
public static NSArray<NSString> getReadableTypeIdentifiersForItemProvider()
-
getWritableTypeIdentifiersForItemProvider0
public static NSArray<NSString> getWritableTypeIdentifiersForItemProvider0()
-
getWritableTypeIdentifiersForItemProvider
public NSArray<NSString> getWritableTypeIdentifiersForItemProvider()
- Specified by:
getWritableTypeIdentifiersForItemProvider
in interfaceNSItemProviderWriting
-
toURL
public java.net.URL toURL() throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
-
toURI
public java.net.URI toURI() throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
-
encodeURLString
public static java.lang.String encodeURLString(java.lang.String urlString, NSStringEncoding encoding)
-
decodeURLString
public static java.lang.String decodeURLString(java.lang.String urlString, NSStringEncoding encoding)
-
getResourceValue
public NSObject getResourceValue(NSURLFileSystemProperty property) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
getResourceValue
public NSObject getResourceValue(NSURLFileProperty property) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
getResourceValue
public NSObject getResourceValue(NSURLVolumeProperty property) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
getResourceValue
public NSObject getResourceValue(NSURLUbiquitousItemProperty property) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
removeCachedResourceValue
public void removeCachedResourceValue(NSURLFileSystemProperty property)
- Since:
- Available in iOS 7.0 and later.
-
removeCachedResourceValue
public void removeCachedResourceValue(NSURLFileProperty property)
- Since:
- Available in iOS 7.0 and later.
-
removeCachedResourceValue
public void removeCachedResourceValue(NSURLVolumeProperty property)
- Since:
- Available in iOS 7.0 and later.
-
removeCachedResourceValue
public void removeCachedResourceValue(NSURLUbiquitousItemProperty property)
- 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
public void setResourceValue(NSURLFileProperty property, NSObject value) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
setResourceValue
public void setResourceValue(NSURLVolumeProperty property, NSObject value) throws NSErrorException
- 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
public void setTemporaryResourceValue(NSURLFileSystemProperty property, NSObject value)
- Since:
- Available in iOS 7.0 and later.
-
setTemporaryResourceValue
public void setTemporaryResourceValue(NSURLFileProperty property, NSObject value)
- Since:
- Available in iOS 7.0 and later.
-
setTemporaryResourceValue
public void setTemporaryResourceValue(NSURLVolumeProperty property, NSObject value)
- Since:
- Available in iOS 7.0 and later.
-
setTemporaryResourceValue
public void setTemporaryResourceValue(NSURLUbiquitousItemProperty property, NSObject value)
- Since:
- Available in iOS 7.0 and later.
-
getPromisedItemResourceValue
public NSObject getPromisedItemResourceValue(NSURLProperty key) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
init
@Deprecated protected long init(java.lang.String scheme, java.lang.String host, java.lang.String path)
Deprecated.Deprecated in iOS 9.0.- Since:
- Available in iOS 2.0 and later.
-
initFileURL
protected long initFileURL(java.lang.String path, boolean isDir, NSURL baseURL)
- Since:
- Available in iOS 9.0 and later.
-
initFileURL
protected long initFileURL(java.lang.String path, NSURL baseURL)
- Since:
- Available in iOS 9.0 and later.
-
initFileURL
protected long initFileURL(java.lang.String path, boolean isDir)
- Since:
- Available in iOS 2.0 and later.
-
initFileURL
protected long initFileURL(java.lang.String path)
-
init
protected long init(java.lang.String URLString)
-
init
protected long init(java.lang.String URLString, NSURL baseURL)
-
initAbsoluteURL
protected long initAbsoluteURL(NSData data, NSURL baseURL)
- Since:
- Available in iOS 9.0 and later.
-
getFileSystemRepresentation
public boolean getFileSystemRepresentation(org.robovm.rt.bro.ptr.BytePtr buffer, long maxBufferLength)
- Since:
- Available in iOS 7.0 and later.
-
checkResourceIsReachable
public boolean checkResourceIsReachable() throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
isFileReferenceURL
public boolean isFileReferenceURL()
- Since:
- Available in iOS 4.0 and later.
-
getFileReferenceURL
public NSURL getFileReferenceURL()
- Since:
- Available in iOS 4.0 and later.
-
getResourceValues
public NSURLProperties getResourceValues(java.util.List<NSURLProperty> keys) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
setResourceValue
public boolean setResourceValue(NSObject value, NSString key) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
setResourceValues
public boolean setResourceValues(NSURLProperties keyedValues) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
removeCachedResourceValue
protected void removeCachedResourceValue(NSString key)
- Since:
- Available in iOS 7.0 and later.
-
removeAllCachedResourceValues
public void removeAllCachedResourceValues()
- Since:
- Available in iOS 7.0 and later.
-
setTemporaryResourceValue
protected void setTemporaryResourceValue(NSObject value, NSString key)
- Since:
- Available in iOS 7.0 and later.
-
toBookmarkData
public NSData toBookmarkData(NSURLBookmarkCreationOptions options, java.util.List<NSURLProperty> keys, NSURL relativeURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
startAccessingSecurityScopedResource
public boolean startAccessingSecurityScopedResource()
- Since:
- Available in iOS 8.0 and later.
-
stopAccessingSecurityScopedResource
public void stopAccessingSecurityScopedResource()
- Since:
- Available in iOS 8.0 and later.
-
getResourceValuesFromBookmarkData
public static NSURLProperties getResourceValuesFromBookmarkData(java.util.List<NSURLProperty> keys, NSData bookmarkData)
- Since:
- Available in iOS 4.0 and later.
-
writeBookmarkData
public static boolean writeBookmarkData(NSData bookmarkData, NSURL bookmarkFileURL, NSURLBookmarkCreationOptions options) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
createBookmarkData
public static NSData createBookmarkData(NSURL bookmarkFileURL) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 4.0 and later.
-
getPromisedItemResourceValue
public boolean getPromisedItemResourceValue(NSObject.NSObjectPtr value, NSString key) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
getPromisedItemResourceValues
public NSURLProperties getPromisedItemResourceValues(java.util.List<NSURLProperty> keys) throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
isPromisedItemReachable
public boolean isPromisedItemReachable() throws NSErrorException
- Throws:
NSErrorException
- Since:
- Available in iOS 8.0 and later.
-
newURLByAppendingPathComponent
public NSURL newURLByAppendingPathComponent(java.lang.String pathComponent)
- Since:
- Available in iOS 4.0 and later.
-
newURLByAppendingPathComponent
public NSURL newURLByAppendingPathComponent(java.lang.String pathComponent, boolean isDirectory)
- Since:
- Available in iOS 5.0 and later.
-
newURLByAppendingPathExtension
public NSURL newURLByAppendingPathExtension(java.lang.String pathExtension)
- Since:
- Available in iOS 4.0 and later.
-
init
protected long init(NSCoder decoder)
-
createProviderDataObject
public static NSURL createProviderDataObject(NSData data, java.lang.String typeIdentifier) throws NSErrorException
- Throws:
NSErrorException
-
getItemProviderVisibility
public NSItemProviderRepresentationVisibility getItemProviderVisibility(java.lang.String typeIdentifier)
- Specified by:
getItemProviderVisibility
in interfaceNSItemProviderWriting
-
loadData
public NSProgress loadData(java.lang.String typeIdentifier, org.robovm.objc.block.VoidBlock2<NSData,NSError> completionHandler)
- Specified by:
loadData
in interfaceNSItemProviderWriting
-
getItemProviderVisibility0
public static NSItemProviderRepresentationVisibility getItemProviderVisibility0(java.lang.String typeIdentifier)
-
-