public static class CoreFoundation.CFStringRef extends CoreFoundation.CFTypeRef
CFString
object, which “encapsulates” a Unicode
string along with its length. CFString
is an opaque type that defines
the characteristics and behavior of CFString
objects.Constructor and Description |
---|
CFStringRef() |
CFStringRef(Pointer p) |
Modifier and Type | Method and Description |
---|---|
static CoreFoundation.CFStringRef |
createCFString(java.lang.String s)
Convenience function which calls
CoreFoundation.CFStringCreateWithCharacters(com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, char[], com.sun.jna.platform.mac.CoreFoundation.CFIndex) to
create a new CoreFoundation.CFStringRef from the given Java String
and returns its reference pointer. |
java.lang.String |
stringValue()
Convert a reference to a Core Foundations String into its
String |
getTypeID, isTypeID, release, retain
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
public CFStringRef()
public CFStringRef(Pointer p)
public static CoreFoundation.CFStringRef createCFString(java.lang.String s)
CoreFoundation.CFStringCreateWithCharacters(com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, char[], com.sun.jna.platform.mac.CoreFoundation.CFIndex)
to
create a new CoreFoundation.CFStringRef
from the given Java String
and returns its reference pointer.
This reference must be released with CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)
to avoid leaking
references.
s
- A String
.s
, or null
if there
was a problem creating the object.public java.lang.String stringValue()
String
String
, or null if the conversion
failed.