public void write(IOutputWriter outputWriter,String label,Object value) throws IOException {
  if (writerIterator == null)   writerIterator=list.iterator();
  Pair<String,Type> current=writerIterator.next();
  if (current == null || !label.equals(current.getFirst()))   throw new IOException("write(): Unexpected label: " + label);
switch (Type.getType(value)) {
case Integer:
    outputWriter.writeInt((Integer)value);
  break;
case Long:
outputWriter.writeLong((Long)value);
break;
case Float:
outputWriter.writeFloat((Float)value);
break;
case String:
outputWriter.writeStringNoCompression((String)value);
break;
case Byte:
outputWriter.write((Byte)value);
break;
case Character:
outputWriter.writeChar((Character)value);
break;
default :
throw new IOException("Invalid type: " + value);
}
}

public void write ( IOutputWriter outputWriter , String label , Object value ) throws IOException { if ( writerIterator == null ) writerIterator = list . iterator ( ) ; Pair < String , Type > current = writerIterator . next ( ) ; if ( current == null || ! label . equals ( current . getFirst ( ) ) ) throw new IOException ( "write(): Unexpected label: " + label ) ; switch ( Type . getType ( value ) ) { case Integer : outputWriter . writeInt ( ( Integer ) value ) ; break ; case Long : outputWriter . writeLong ( ( Long ) value ) ; break ; case Float : outputWriter . writeFloat ( ( Float ) value ) ; break ; case String : outputWriter . writeStringNoCompression ( ( String ) value ) ; break ; case Byte : outputWriter . write ( ( Byte ) value ) ; break ; case Character : outputWriter . writeChar ( ( Character ) value ) ; break ; default : throw new IOException ( "Invalid type: " + value ) ; } }
write an item to the output writer . throws an exception of doesn ' t make the defined format
