code: private static Writable getWritableFromObject(Object object) {
  
          Writable writable = null;
  
          if (object instanceof String) {
  
              writable = new Text(object.toString());
  
          } else if (object instanceof Long) {
  
              writable = new LongWritable((Long) object);
  
          } else {
  
              writable = new IntWritable((Integer) object);
  
          }
          // writable = writable!=null?writable:new Text("");
          return writable;
      }
docs: Returns the object inside Writable
  
  @param object
  @return
  @throws IllegalAccessException
  @throws InstantiationException
  @throws InvocationTargetException
  @throws NoSuchMethodException