public class NSDate extends NSObject
| Constructor and Description |
|---|
NSDate(byte[] bytes)
Creates a date from its binary representation.
|
NSDate(Date d)
Creates a NSDate from a Java Date
|
NSDate(String textRepresentation)
Parses a date from its textual representation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Date |
getDate()
Gets the date.
|
int |
hashCode() |
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()
Generates a string representation of the date.
|
toJavaObject, toXMLPropertyList, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrapSerializedpublic NSDate(byte[] bytes)
bytes - The date bytespublic NSDate(String textRepresentation) throws ParseException
yyyy-MM-dd'T'HH:mm:ss'Z'textRepresentation - The textual representation of the date (ISO 8601 format)ParseException - When the date could not be parsed, i.e. it does not match the expected pattern.public NSDate(Date d)
d - The datepublic Date getDate()
public void toBinary(BinaryPropertyListWriter out) throws IOException
NSObjectout - The output stream to serialize the object to.IOExceptionpublic String toString()
toString in class ObjectDate.toString()protected 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.Copyright © 2013. All Rights Reserved.