congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
StringMapDataCommand
Code IndexAdd Tabnine to your IDE (free)

How to use
StringMapDataCommand
in
net.java.btrace.wireio.commands

Best Java code snippets using net.java.btrace.wireio.commands.StringMapDataCommand (Showing top 6 results out of 315)

origin: org.gridkit.3rd.btrace/core

@Override
final public void write(ObjectOutput out) throws IOException {
  super.write(out);
  Map<String, String> map = getPayload();
  if (map != null) {
    out.writeInt(map.size());
    for (Map.Entry<String, String> e : map.entrySet()) {
      out.writeUTF(e.getKey());
      out.writeUTF(e.getValue());
    }
  } else {
    out.writeInt(0);
  }
}
origin: org.gridkit.3rd.btrace/core

  @Override
  final public void read(ObjectInput in)
      throws IOException, ClassNotFoundException {
    super.read(in);
    Map<String, String> map = new HashMap<String, String>();
    int sz = in.readInt();
    for (int i = 0; i < sz; i++) {
      map.put(in.readUTF(), (String) in.readUTF());
    }
    setPayload(map);
  }
}
origin: org.gridkit.3rd.btrace/client

  public void execute(Lookup ctx, StringMapDataCommand cmd) {
    PrintWriter pw = ctx.lookup(PrintWriter.class);
    if (pw != null) {
      pw.println("String map [" + cmd.getName() + "]");
      StringBuilder sb = new StringBuilder();
      int maxSize = 0;
      for(Map.Entry<String, String> e : cmd.getPayload().entrySet()) {
        sb.append(e.getKey()).append(" = ").append(e.getValue()).append("\n");
        maxSize = Math.max(maxSize, e.getKey().length() + e.getValue().length() + 3);
      }
      sb.insert(0, "\n");
      for(int i=0;i<maxSize;i++) {
        sb.insert(0, "=");
      }
      pw.print(sb);
    }
  }
}
origin: jbachorik/btrace2

  public void execute(Lookup ctx, StringMapDataCommand cmd) {
    PrintWriter pw = ctx.lookup(PrintWriter.class);
    if (pw != null) {
      pw.println("String map [" + cmd.getName() + "]");
      StringBuilder sb = new StringBuilder();
      int maxSize = 0;
      for(Map.Entry<String, String> e : cmd.getPayload().entrySet()) {
        sb.append(e.getKey()).append(" = ").append(e.getValue()).append("\n");
        maxSize = Math.max(maxSize, e.getKey().length() + e.getValue().length() + 3);
      }
      sb.insert(0, "\n");
      for(int i=0;i<maxSize;i++) {
        sb.insert(0, "=");
      }
      pw.print(sb);
    }
  }
}
origin: jbachorik/btrace2

@Override
final public void write(ObjectOutput out) throws IOException {
  super.write(out);
  Map<String, String> map = getPayload();
  if (map != null) {
    out.writeInt(map.size());
    for (Map.Entry<String, String> e : map.entrySet()) {
      out.writeUTF(e.getKey());
      out.writeUTF(e.getValue());
    }
  } else {
    out.writeInt(0);
  }
}
origin: jbachorik/btrace2

  @Override
  final public void read(ObjectInput in)
      throws IOException, ClassNotFoundException {
    super.read(in);
    Map<String, String> map = new HashMap<String, String>();
    int sz = in.readInt();
    for (int i = 0; i < sz; i++) {
      map.put(in.readUTF(), (String) in.readUTF());
    }
    setPayload(map);
  }
}
net.java.btrace.wireio.commandsStringMapDataCommand

Javadoc

A data command that hold data of type Map.

Most used methods

  • getPayload
  • getName
  • setPayload

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JTextField (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now