code: private ByteBuffer getBytesAccordingToType(String object, AbstractType<?> comparator)
      {
          if (comparator == null) // default comparator is BytesType
              comparator = BytesType.instance;
  
          try
          {
              return comparator.fromString(object);
          }
          catch (MarshalException e)
          {
              throw new RuntimeException(e);
          }
      }
docs: Converts object represented as string into byte[] according to comparator
  @param object - object to covert into byte array
  @param comparator - comparator used to convert object
  @return byte[] - object in the byte array representation