public static ToaHeader createNewHeader(byte type, MessageID messageID) { if (messageID == null) { throw new NullPointerException("The message ID can't be null"); } ToaHeader header = new ToaHeader(); header.setType(type); header.setMessageID(messageID); return header; }
public static ToaHeader createSingleDestinationHeader() { ToaHeader header = new ToaHeader(); header.setType(SINGLE_DESTINATION_MESSAGE); return header; }