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, wrapSerialized
public 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
NSObject
out
- The output stream to serialize the object to.IOException
public String toString()
toString
in class Object
Date.toString()
protected void toASCII(StringBuilder ascii, int level)
NSObject
protected void toASCIIGnuStep(StringBuilder ascii, int level)
NSObject
toASCIIGnuStep
in class NSObject
ascii
- The StringBuilder onto which the ASCII representation is appended.level
- The indentation level of the object.Copyright © 2014. All Rights Reserved.