code: private static Object getObjectFromWritable(Writable writable)
              throws IllegalAccessException, InstantiationException, InvocationTargetException {
          Object object = null;
  
          if (writable instanceof NullWritable) {
              object = NullWritable.get();
          } else if (writable instanceof BooleanWritable) {
              object = ((BooleanWritable) writable).get();
          } else if (writable instanceof Text) {
              object = writable.toString();
          } else if (writable instanceof ByteWritable) {
              object = ((ByteWritable) writable).get();
          } else if (writable instanceof IntWritable) {
              object = ((IntWritable) writable).get();
          } else if (writable instanceof LongWritable) {
              object = ((LongWritable) writable).get();
          } else if (writable instanceof BytesWritable) {
              object = ((BytesWritable) writable).getBytes();
          } else if (writable instanceof DoubleWritable) {
              object = ((DoubleWritable) writable).get();
          } else if (writable instanceof FloatWritable) {
              object = ((FloatWritable) writable).get();
          } else {
              // TODO : do nothing
          }
  
          return object;
      }
docs: Returns the object inside Writable
  
  @param writable
  @return
  @throws IllegalAccessException
  @throws InstantiationException
  @throws InvocationTargetException
  @throws NoSuchMethodException