public void write(DataOutput out) throws IOException { out.write(BASE_TYPE); out.writeUTF(name); out.writeInt(sampleStrs.size()); for (int i = 0; i < sampleStrs.size(); i++) { UTF8.writeString(out, sampleStrs.get(i)); } out.writeInt(tokenClassIdentifier); out.writeBoolean(tokenParameter != null); if (tokenParameter != null) { UTF8.writeString(out, tokenParameter); } }