Comment2000Atompublic class Comment2000Atom extends RecordAtom An atomic record containing information about a comment. |
Fields Summary |
---|
private byte[] | _headerRecord header. | private byte[] | _dataRecord data. |
Constructors Summary |
---|
protected Comment2000Atom()Constructs a brand new comment atom record.
_header = new byte[8];
_data = new byte[28];
LittleEndian.putShort(_header, 2, (short)getRecordType());
LittleEndian.putInt(_header, 4, _data.length);
// It is fine for the other values to be zero
| protected Comment2000Atom(byte[] source, int start, int len)Constructs the comment atom record from its source data.
// Get the header.
_header = new byte[8];
System.arraycopy(source,start,_header,0,8);
// Get the record data.
_data = new byte[len-8];
System.arraycopy(source,start+8,_data,0,len-8);
|
Methods Summary |
---|
public java.util.Date | getDate()Gets the date the comment was made.
return SystemTimeUtils.getDate(_data,4);
| public int | getNumber()Gets the comment number (note - each user normally has their own count).
return LittleEndian.getInt(_data,0);
| public long | getRecordType()Gets the record type. return RecordTypes.Comment2000Atom.typeID;
| public int | getXOffset()Gets the X offset of the comment on the page.
return LittleEndian.getInt(_data,20);
| public int | getYOffset()Gets the Y offset of the comment on the page.
return LittleEndian.getInt(_data,24);
| public void | setDate(java.util.Date date)Sets the date the comment was made.
SystemTimeUtils.storeDate(date, _data, 4);
| public void | setNumber(int number)Sets the comment number (note - each user normally has their own count).
LittleEndian.putInt(_data,0,number);
| public void | setXOffset(int xOffset)Sets the X offset of the comment on the page.
LittleEndian.putInt(_data,20,xOffset);
| public void | setYOffset(int yOffset)Sets the Y offset of the comment on the page.
LittleEndian.putInt(_data,24,yOffset);
| public void | writeOut(java.io.OutputStream out)Write the contents of the record back, so it can be written
to disk
out.write(_header);
out.write(_data);
|
|