public class DateWritable
extends java.lang.Object
| Constructor and Description |
|---|
DateWritable() |
DateWritable(java.sql.Date d) |
DateWritable(DateWritable d) |
DateWritable(int d) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(DateWritable d) |
static int |
dateToDays(java.sql.Date d) |
static long |
daysToMillis(int d) |
boolean |
equals(java.lang.Object o) |
java.sql.Date |
get() |
int |
getDays() |
long |
getTimeInSeconds() |
int |
hashCode() |
void |
readFields(java.io.DataInput in) |
void |
set(java.sql.Date d)
Set the DateWritable based on the year/month/day of the date in the local timezone.
|
void |
set(DateWritable d) |
void |
set(int d)
Set the DateWritable based on the days since epoch date.
|
void |
setFromBytes(byte[] bytes,
int offset,
int length,
LazyBinaryUtils.VInt vInt) |
static java.sql.Date |
timeToDate(long l) |
java.lang.String |
toString() |
void |
write(java.io.DataOutput out) |
void |
writeToByteStream(ByteStream.Output byteStream) |
public DateWritable()
public DateWritable(DateWritable d)
public DateWritable(java.sql.Date d)
public DateWritable(int d)
public void set(int d)
d - integer value representing days since epoch datepublic void set(java.sql.Date d)
d - Date valuepublic void set(DateWritable d)
public java.sql.Date get()
public int getDays()
public long getTimeInSeconds()
public static java.sql.Date timeToDate(long l)
public static long daysToMillis(int d)
public static int dateToDays(java.sql.Date d)
public void setFromBytes(byte[] bytes,
int offset,
int length,
LazyBinaryUtils.VInt vInt)
public void writeToByteStream(ByteStream.Output byteStream)
public void readFields(java.io.DataInput in)
throws java.io.IOException
java.io.IOExceptionpublic void write(java.io.DataOutput out)
throws java.io.IOException
java.io.IOExceptionpublic int compareTo(DateWritable d)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2012 The Apache Software Foundation