Exemplo n.º 1
0
 @Override
 protected String toString(char[] buffer, int offset, int length) {
   Map.Entry entry = _fieldStrings.getEntry(buffer, offset, length);
   if (entry != null) return (String) entry.getValue();
   String s = new String(buffer, offset, length);
   return s;
 }
Exemplo n.º 2
0
  {
    _fieldStrings.put(Bayeux.ADVICE_FIELD, Bayeux.ADVICE_FIELD);
    _fieldStrings.put(Bayeux.CHANNEL_FIELD, Bayeux.CHANNEL_FIELD);
    _fieldStrings.put(Bayeux.CLIENT_FIELD, Bayeux.CLIENT_FIELD);
    _fieldStrings.put("connectionType", "connectionType");
    _fieldStrings.put(Bayeux.DATA_FIELD, Bayeux.DATA_FIELD);
    _fieldStrings.put(Bayeux.ERROR_FIELD, Bayeux.ERROR_FIELD);
    _fieldStrings.put(Bayeux.EXT_FIELD, Bayeux.EXT_FIELD);
    _fieldStrings.put(Bayeux.ID_FIELD, Bayeux.ID_FIELD);
    _fieldStrings.put(Bayeux.SUBSCRIPTION_FIELD, Bayeux.SUBSCRIPTION_FIELD);
    _fieldStrings.put(Bayeux.SUCCESSFUL_FIELD, Bayeux.SUCCESSFUL_FIELD);
    _fieldStrings.put(Bayeux.TIMESTAMP_FIELD, Bayeux.TIMESTAMP_FIELD);
    _fieldStrings.put(Bayeux.TRANSPORT_FIELD, Bayeux.TRANSPORT_FIELD);

    _valueStrings.put(Bayeux.META_CLIENT, Bayeux.META_CLIENT);
    _valueStrings.put(Bayeux.META_CONNECT, Bayeux.META_CONNECT);
    _valueStrings.put(Bayeux.META_DISCONNECT, Bayeux.META_DISCONNECT);
    _valueStrings.put(Bayeux.META_HANDSHAKE, Bayeux.META_HANDSHAKE);
    _valueStrings.put(Bayeux.META_SUBSCRIBE, Bayeux.META_SUBSCRIBE);
    _valueStrings.put(Bayeux.META_UNSUBSCRIBE, Bayeux.META_UNSUBSCRIBE);
  }