code: protected void serializeObject(final DataOutputStream dos, final Object value) throws IOException {
  
  		if (value != null) {
  
  			final Integer typeKey = TypeMap.get(value.getClass());
  			if (typeKey != null) {
  
  				dos.writeInt(typeKey);
  
  				switch (typeKey) {
  
  					case 1:
  						dos.writeUTF((String)value);
  						break;
  
  					case 2:
  						dos.writeInt((Integer)value);
  						break;
  
  					case 3:
  						dos.writeLong((Long)value);
  						break;
  
  					case 4:
  						dos.writeBoolean((Boolean)value);
  						break;
  
  					case 5:
  						dos.writeDouble((Double)value);
  						break;
  
  					case 6:
  						dos.writeFloat((Float)value);
  						break;
  
  					case 100:
  						serializeList(dos, (List<Object>)value);
  						break;
  
  				}
  
  			} else {
  
  				System.out.println("Unknown type " + value.getClass() + ", cannot serialize!");
  			}
  
  		} else {
  
  			dos.writeInt(0);
  		}
  	}
docs: ----- protected methods -----