Code example for Timestamp

Methods: getNanos, getTime

0
   * 
   * @return seconds corresponding to this TimestampWritable 
   */ 
  public int getSeconds() { 
    if (bytesEmpty) {
      return (int) (timestamp.getTime() / 1000);
    } 
    return TimestampWritable.getSeconds(currentBytes, offset);
  } 
 
  /** 
   * 
   * @return nanoseconds in this TimestampWritable 
   */ 
  public int getNanos() { 
    if (!timestampEmpty) {
      return timestamp.getNanos();
    } 
 
    return TimestampWritable.getNanos(currentBytes, offset+4);
  }