* @return the appropriate write mode
*/
public int setStructure(Instances headerInfo){
Capabilities cap = getCapabilities();
if (!cap.test(headerInfo))
throw new IllegalArgumentException(cap.getFailReason());
if(m_writeMode == WAIT && headerInfo != null){
m_instances = headerInfo;
m_writeMode = STRUCTURE_READY;