private static String indexExpressionsToString ( List < IndexExpression > indexExpressions ) throws IOException { assert indexExpressions != null ; // oh, you thought cfdefToString was awful? IndexClause indexClause = new IndexClause ( ) ; indexClause . setExpressions ( indexExpressions ) ; indexClause . setStart_key ( "" . getBytes ( ) ) ; TSerializer serializer = new TSerializer ( new TBinaryProtocol . Factory ( ) ) ; try { return Hex . bytesToHex ( serializer . serialize ( indexClause ) ) ; } catch ( TException e ) { throw new IOException ( e ) ; } }
convert a list of index expression to string