PenProfile 2.x

com.livescribe.event
Class PenletEvent

java.lang.Object
  extended by com.livescribe.event.Event
      extended by com.livescribe.event.PenletEvent
Direct Known Subclasses:
CoordinateEvent, PaperEvent, SystemEvent

public class PenletEvent
extends Event

This event type provides support for timestamp and size data. This class is not for use by 3rd party developers.


Field Summary
 int size
          The associated size information, if relevant.
 long time
          The event time.
 
Fields inherited from class com.livescribe.event.Event
consumed, eventId
 
Constructor Summary
protected PenletEvent(int[] eventArray)
          Creates a new penlet event.
  PenletEvent(long time, int size, int id)
          Deprecated.  
 
Method Summary
 long getTime()
          Gets the event time.
protected  String toDate()
          Returns the event's timestamp.
 String toString()
          Returns a string representation of this event.
 
Methods inherited from class com.livescribe.event.Event
consume, getId, isConsumed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

time

public final long time
The event time.


size

public final int size
The associated size information, if relevant. Note that this field has nothing to do necessarily with the event content size.

Constructor Detail

PenletEvent

protected PenletEvent(int[] eventArray)
Creates a new penlet event.

The array is a list of integers and its format is as follows.

  1. ID
  2. Size information
  3. Low part of timestamp
  4. High part of timestamp

If the array contains less than four elements then only the ID is used from index zero and the time and size are set to zero. In other words, the array must contain at least one element.

Parameters:
eventArray - the event data, an integer array

PenletEvent

public PenletEvent(long time,
                   int size,
                   int id)
Deprecated. 

Creates a new penlet event using the given parameters.

Parameters:
time - the time
size - the size
id - the event ID
Method Detail

getTime

public long getTime()
Gets the event time.

Returns:
the event time.

toString

public String toString()
Returns a string representation of this event.

Overrides:
toString in class Object
Returns:
a string representation of this event.

toDate

protected String toDate()
Returns the event's timestamp.

Returns:
the event's timestamp or "[no time]" if the time is zero.

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.