public class NSString extends NSObject implements Comparable<Object>
| Constructor and Description |
|---|
NSString(byte[] bytes,
String encoding)
Creates an NSString from its binary representation.
|
NSString(String string)
Creates a NSString from a string.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(NSString s)
Appends a string to this string.
|
void |
append(String s)
Appends a string to this string.
|
int |
compareTo(Object o) |
boolean |
equals(Object obj) |
String |
getContent()
Gets this strings content.
|
int |
hashCode() |
void |
prepend(NSString s)
Prepends a string to this string.
|
void |
prepend(String s)
Prepends a string to this string.
|
void |
setContent(String c)
Sets the contents of this string.
|
protected void |
toASCII(StringBuilder ascii,
int level)
Generates the ASCII representation of this object.
|
protected void |
toASCIIGnuStep(StringBuilder ascii,
int level)
Generates the ASCII representation of this object in the GnuStep format.
|
void |
toBinary(BinaryPropertyListWriter out)
Generates the binary representation of the object.
|
String |
toString()
The textual representation of this NSString.
|
toJavaObject, toXMLPropertyList, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrapSerializedpublic NSString(byte[] bytes,
String encoding)
throws UnsupportedEncodingException
bytes - The binary representation.encoding - The encoding of the binary representation, the name of a supported charset.UnsupportedEncodingExceptionStringpublic NSString(String string)
string - The string that will be contained in the NSString.public String getContent()
public void setContent(String c)
c - The new content of this string object.public void append(NSString s)
s - The string to append.public void append(String s)
s - The string to append.public void prepend(String s)
s - The string to prepend.public void prepend(NSString s)
s - The string to prepend.public String toString()
public void toBinary(BinaryPropertyListWriter out) throws IOException
NSObjectout - The output stream to serialize the object to.IOExceptionprotected void toASCII(StringBuilder ascii, int level)
NSObjectprotected void toASCIIGnuStep(StringBuilder ascii, int level)
NSObjecttoASCIIGnuStep in class NSObjectascii - The StringBuilder onto which the ASCII representation is appended.level - The indentation level of the object.public int compareTo(Object o)
compareTo in interface Comparable<Object>Copyright © 2013. All Rights Reserved.