FileDocCategorySizeDatePackage
Environment.javaAPI DocApache Poi 3.0.12722Sun Mar 11 12:59:30 GMT 2007org.apache.poi.hslf.record

Environment

public class Environment extends PositionDependentRecordContainer
Environment, which contains lots of settings for the document.
author
Nick Burch

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!");
		}
	
Methods Summary
public org.apache.poi.hslf.record.FontCollectiongetFontCollection()
Returns the FontCollection of this Environment


	      	 
	    return fontCollection; 
public longgetRecordType()
We are of type 1010

 return _type; 
public org.apache.poi.hslf.record.TxMasterStyleAtomgetTxMasterStyleAtom()

        return txmaster;
    
public voidwriteOut(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);