@Test public void testBuildApi() { assertEquals("000140FOO BAR^00000", OldRpcMessageWriter.buildApi("FOO BAR", "", 0)); }
public static String buildApi(String n, String p, long f) { StringBuilder sb = new StringBuilder(); sb.append(f); sb.append(n); sb.append("^"); sb.append(strPack(p, 5)); return strPack(sb.toString(), 5); }
OldRpcMessageWriter implements RpcMessageWriter { public static String buildApi(String n, String p, long f) { StringBuilder sb = new StringBuilder(); sb.append(f); sb.append(n); sb.append("^"); sb.append(strPack(p, 5)); return strPack(sb.toString(), 5); } }
OldRpcMessageWriter implements RpcMessageWriter { public static String buildApi(String n, String p, long f) { StringBuilder sb = new StringBuilder(); sb.append(f); sb.append(n); sb.append("^"); sb.append(strPack(p, 5)); return strPack(sb.toString(), 5); } OldRpcMessageWriter(Writer w); }
OldRpcMessageWriter implements RpcMessageWriter { public static String buildApi(String n, String p, long f) { StringBuilder sb = new StringBuilder(); sb.append(f); sb.append(n); sb.append("^"); sb.append(strPack(p, 5)); return strPack(sb.toString(), 5); } OldRpcMessageWriter(Writer w); void writeStartConnection(String hostname, String address, int localPort); void writeStopConnection(); void write(RpcRequest request); void flush(); static String buildApi(String n, String p, long f); static String buildHdr(String wkid, String winh, String prch, String wish); static String strPack(String n, int p); static String varPack(String n); }
OldRpcMessageWriter implements RpcMessageWriter { public static String buildApi(String n, String p, long f) { StringBuilder sb = new StringBuilder(); sb.append(f); sb.append(n); sb.append("^"); sb.append(strPack(p, 5)); return strPack(sb.toString(), 5); } OldRpcMessageWriter(Writer w); void writeStartConnection(String hostname, String address, int localPort); void writeStopConnection(); void write(RpcRequest request); void flush(); static String buildApi(String n, String p, long f); static String buildHdr(String wkid, String winh, String prch, String wish); static String strPack(String n, int p); static String varPack(String n); static final String PREFIX; }