예제 #1
0
  public static FudgeMsg createMessageWithSubMsgs() {
    FudgeMsg msg = new FudgeMsg();
    FudgeMsg sub1 = new FudgeMsg();
    sub1.add("bibble", "fibble");
    sub1.add(827, "Blibble");
    FudgeMsg sub2 = new FudgeMsg();
    sub2.add("bibble9", 9837438);
    sub2.add(828, 82.77f);
    msg.add("sub1", sub1);
    msg.add("sub2", sub2);

    return msg;
  }
예제 #2
0
  public static FudgeMsg createMessageAllByteArrayLengths() {
    FudgeMsg msg = new FudgeMsg();
    msg.add("byte[4]", new byte[4]);
    msg.add("byte[8]", new byte[8]);
    msg.add("byte[16]", new byte[16]);
    msg.add("byte[20]", new byte[20]);
    msg.add("byte[32]", new byte[32]);
    msg.add("byte[64]", new byte[64]);
    msg.add("byte[128]", new byte[128]);
    msg.add("byte[256]", new byte[256]);
    msg.add("byte[512]", new byte[512]);

    msg.add("byte[28]", new byte[28]);
    return msg;
  }
예제 #3
0
  public static FudgeMsg createMessageAllOrdinals() {
    FudgeMsg msg = new FudgeMsg();

    msg.add(1, Boolean.TRUE);
    msg.add(2, new Boolean(false));
    msg.add(3, (byte) 5);
    msg.add(4, new Byte((byte) 5));
    short shortValue = ((short) Byte.MAX_VALUE) + 5;
    msg.add(5, shortValue);
    msg.add(6, new Short(shortValue));
    int intValue = ((int) Short.MAX_VALUE) + 5;
    msg.add(7, intValue);
    msg.add(8, new Integer(intValue));
    long longValue = ((long) Integer.MAX_VALUE) + 5;
    msg.add(9, longValue);
    msg.add(10, new Long(longValue));

    msg.add(11, 0.5f);
    msg.add(12, new Float(0.5f));
    msg.add(13, 0.27362);
    msg.add(14, new Double(0.27362));

    msg.add(15, "Kirk Wylie");

    msg.add(16, new float[24]);
    msg.add(17, new double[273]);

    return msg;
  }
예제 #4
0
  public static FudgeMsg createMessageAllNames() {
    FudgeMsg msg = new FudgeMsg();

    msg.add("boolean", Boolean.TRUE);
    msg.add("Boolean", new Boolean(false));
    msg.add("byte", (byte) 5);
    msg.add("Byte", new Byte((byte) 5));
    short shortValue = ((short) Byte.MAX_VALUE) + 5;
    msg.add("short", shortValue);
    msg.add("Short", new Short(shortValue));
    int intValue = ((int) Short.MAX_VALUE) + 5;
    msg.add("int", intValue);
    msg.add("Integer", new Integer(intValue));
    long longValue = ((long) Integer.MAX_VALUE) + 5;
    msg.add("long", longValue);
    msg.add("Long", new Long(longValue));

    msg.add("float", 0.5f);
    msg.add("Float", new Float(0.5f));
    msg.add("double", 0.27362);
    msg.add("Double", new Double(0.27362));

    msg.add("String", "Kirk Wylie");

    msg.add("float array", new float[24]);
    msg.add("double array", new double[273]);
    msg.add("short array", new short[32]);
    msg.add("int array", new int[83]);
    msg.add("long array", new long[837]);

    msg.add("indicator", IndicatorType.INSTANCE);

    return msg;
  }