FileDocCategorySizeDatePackage
UnknownRecordPlaceholder.javaAPI DocApache Poi 3.0.12144Mon Jan 01 18:55:34 GMT 2007org.apache.poi.hslf.record

UnknownRecordPlaceholder

public class UnknownRecordPlaceholder extends RecordAtom
If we come across a record we don't know about, we create one of these. It allows us to keep track of what it contains, so we can write it back out to disk unchanged
author
Nick Burch

Fields Summary
private byte[]
_contents
private long
_type
Constructors Summary
protected UnknownRecordPlaceholder(byte[] source, int start, int len)
Create a new holder for a record we don't grok

		// Sanity Checking - including whole header, so treat
		//  length as based of 0, not 8 (including header size based)
		if(len < 0) { len = 0; }

		// Treat as an atom, grab and hold everything
		_contents = new byte[len];
		System.arraycopy(source,start,_contents,0,len);
		_type = LittleEndian.getUShort(_contents,2);
	
Methods Summary
public longgetRecordType()
Return the value we were given at creation

 return _type; 
public voidwriteOut(java.io.OutputStream out)
Write the contents of the record back, so it can be written to disk

		out.write(_contents);