private static Object toStringType(Object value) {
    if (value instanceof String) {
      return value;
    } else if (value instanceof DataByteArray) {
      byte[] buf = ((DataByteArray)value).get();
      // mostly there is no need to copy.
      return ByteBuffer.wrap(Arrays.copyOf(buf, buf.length));
    }
    return null;
  }
private static Object toStringType(Object value) {
    if (value instanceof String) {
      return value;
    } else if (value instanceof DataByteArray) {
      byte[] buf = ((DataByteArray)value).get();
      
      return ByteBuffer.wrap(Arrays.copyOf(buf, buf.length));
    }
    return null;
  }
private static Object toStringType ( Object value ) { if ( value instanceof String ) { return value ; } else if ( value instanceof DataByteArray ) { byte [ ] buf = ( ( DataByteArray ) value ) . get ( ) ; // mostly there is no need to copy. return ByteBuffer . wrap ( Arrays . copyOf ( buf , buf . length ) ) ; } return null ; }
/* TType.STRING could be either a DataByteArray or a String
/ * TType . STRING could be either a DataByteArray or a String