catch (NumberFormatException e)
{
return null;
}
}
return new QueryMessage(query, new QueryOptions(ConsistencyLevel.ONE, Collections.<ByteBuffer>emptyList(), false, pageSize, null, null));
}
else if (msgType.equals("PREPARE"))
{
String query = line.substring(8);
return new PrepareMessage(query);
}
else if (msgType.equals("EXECUTE"))
{
try
{
byte[] id = Hex.hexToBytes(iter.next());
List<ByteBuffer> values = new ArrayList<ByteBuffer>();
while(iter.hasNext())
{
String next = iter.next();
ByteBuffer bb;
try
{
int v = Integer.parseInt(next);
bb = Int32Type.instance.decompose(v);
}
catch (NumberFormatException e)
{
bb = UTF8Type.instance.decompose(next);
}
values.add(bb);
}
return new ExecuteMessage(MD5Digest.wrap(id), new QueryOptions(ConsistencyLevel.ONE, values));
}
catch (Exception e)
{
return null;
}