public void readFields(DataInput in) throws IOException { // instance-specific this.sampleStrs = new ArrayList<String>(); int numSamples = in.readInt(); for (int i = 0; i < numSamples; i++) { sampleStrs.add(UTF8.readString(in).toString()); } this.tokenClassIdentifier = in.readInt(); if (in.readBoolean()) { this.tokenParameter = UTF8.readString(in); } else { this.tokenParameter = null; } this.schema = computeAvroSchema(); }