ExObjListpublic class ExObjList extends RecordContainer This class holds the links to exernal objects referenced
from the document. |
Fields Summary |
---|
private byte[] | _header | private static long | _type | private ExObjListAtom | exObjListAtom |
Constructors Summary |
---|
protected ExObjList(byte[] source, int start, int len)Set things up, and find our more interesting children
// Grab the header
_header = new byte[8];
System.arraycopy(source,start,_header,0,8);
// Find our children
_children = Record.findChildRecords(source,start+8,len-8);
findInterestingChildren();
| public ExObjList()Create a new ExObjList, with blank fields
_header = new byte[8];
_children = new Record[1];
// Setup our header block
_header[0] = 0x0f; // We are a container record
LittleEndian.putShort(_header, 2, (short)_type);
// Setup our child records
_children[0] = new ExObjListAtom();
findInterestingChildren();
|
Methods Summary |
---|
private void | findInterestingChildren()Go through our child records, picking out the ones that are
interesting, and saving those for use by the easy helper
methods.
// First child should be the atom
if(_children[0] instanceof ExObjListAtom) {
exObjListAtom = (ExObjListAtom)_children[0];
} else {
throw new IllegalStateException("First child record wasn't a ExObjListAtom, was of type " + _children[0].getRecordType());
}
| public org.apache.poi.hslf.record.ExHyperlink | get(int id)Lookup a hyperlink by its unique id
for(int i=0; i<_children.length; i++) {
if(_children[i] instanceof ExHyperlink) {
ExHyperlink rec = (ExHyperlink)_children[i];
if (rec.getExHyperlinkAtom().getNumber() == id){
return rec;
}
}
}
return null;
| public org.apache.poi.hslf.record.ExHyperlink[] | getExHyperlinks()Returns all the ExHyperlinks
ArrayList links = new ArrayList();
for(int i=0; i<_children.length; i++) {
if(_children[i] instanceof ExHyperlink) {
links.add(_children[i]);
}
}
return (ExHyperlink[])links.toArray(new ExHyperlink[links.size()]);
| public org.apache.poi.hslf.record.ExObjListAtom | getExObjListAtom()Returns the ExObjListAtom of this list
return exObjListAtom;
| public long | getRecordType()We are of type 1033 return _type;
| public void | writeOut(java.io.OutputStream out)Write the contents of the record back, so it can be written
to disk
writeOut(_header[0],_header[1],_type,_children,out);
|
|