TxInteractiveInfoAtompublic class TxInteractiveInfoAtom extends RecordAtom Tne atom that holds starting and ending character positions of a hyperlink |
Fields Summary |
---|
private byte[] | _headerRecord header. | private byte[] | _dataRecord data. |
Constructors Summary |
---|
protected TxInteractiveInfoAtom()Constructs a brand new link related atom record.
_header = new byte[8];
_data = new byte[8];
LittleEndian.putShort(_header, 2, (short)getRecordType());
LittleEndian.putInt(_header, 4, _data.length);
| protected TxInteractiveInfoAtom(byte[] source, int start, int len)Constructs the link related 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 int | getEndIndex()Gets the ending character position
return LittleEndian.getInt(_data, 4);
| public long | getRecordType()Gets the record type. return RecordTypes.TxInteractiveInfoAtom.typeID;
| public int | getStartIndex()Gets the beginning character position
return LittleEndian.getInt(_data, 0);
| public void | setEndIndex(int idx)Sets the ending character position
LittleEndian.putInt(_data, 4, idx);
| public void | setStartIndex(int idx)Sets the beginning character position
LittleEndian.putInt(_data, 0, idx);
| 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);
|
|