Environmentpublic class Environment extends PositionDependentRecordContainer Environment, which contains lots of settings for the document. |
Fields Summary |
---|
private byte[] | _header | private static long | _type | private FontCollection | fontCollection | private TxMasterStyleAtom | txmaster |
Constructors Summary |
---|
protected Environment(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);
// Find our FontCollection record
for(int i=0; i<_children.length; i++) {
if(_children[i] instanceof FontCollection) {
fontCollection = (FontCollection)_children[i];
} else if (_children[i] instanceof TxMasterStyleAtom){
txmaster = (TxMasterStyleAtom)_children[i];
}
}
if(fontCollection == null) {
throw new IllegalStateException("Environment didn't contain a FontCollection record!");
}
|
|