Tabnine Logo
ByteArrayDataOutputStream.writeShort
Code IndexAdd Tabnine to your IDE (free)

How to use
writeShort
method
in
org.jgroups.util.ByteArrayDataOutputStream

Best Java code snippets using org.jgroups.util.ByteArrayDataOutputStream.writeShort (Showing top 10 results out of 315)

origin: wildfly/wildfly

writeShort(-1);
return;
origin: wildfly/wildfly

protected void sendLocalAddress(Address local_addr) throws Exception {
  try {
    int addr_size=local_addr.serializedSize();
    int expected_size=cookie.length + Global.SHORT_SIZE*2 + addr_size;
    ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(expected_size +2);
    out.write(cookie, 0, cookie.length);
    out.writeShort(Version.version);
    out.writeShort(addr_size); // address size
    local_addr.writeTo(out);
    ByteBuffer buf=out.getByteBuffer();
    send(buf, false);
    updateLastAccessed();
  }
  catch(Exception ex) {
    close();
    throw ex;
  }
}
origin: wildfly/wildfly

dos.writeShort(Version.version); // write the version
if(msg.getDest() == null)
  flags+=(byte)2;
origin: wildfly/wildfly

  protected Buffer writeMessage(final Message msg) throws Exception {
    dos.position(0);
    byte flags=0;
    dos.writeShort(Version.version); // write the version
    if(msg.getDest() == null)
      flags+=(byte)2;
    dos.writeByte(flags);
    msg.writeTo(dos);
    return new Buffer(dos.buffer(), 0, dos.position());
  }
}
origin: wildfly/wildfly

protected static Buffer marshal(final View view, final Digest digest) {
  try {
    int expected_size=Global.SHORT_SIZE;
    if(view != null)
      expected_size+=view.serializedSize();
    boolean write_addrs=writeAddresses(view, digest);
    if(digest != null)
      expected_size=(int)digest.serializedSize(write_addrs);
    final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(expected_size +10);
    out.writeShort(determineFlags(view, digest));
    if(view != null)
      view.writeTo(out);
    if(digest != null)
      digest.writeTo(out, write_addrs);
    return out.getBuffer();
  }
  catch(Exception ex) {
    return null;
  }
}
origin: org.jboss.eap/wildfly-client-all

writeShort(-1);
return;
origin: org.jboss.eap/wildfly-client-all

dos.writeShort(Version.version); // write the version
if(msg.getDest() == null)
  flags+=(byte)2;
origin: org.jboss.eap/wildfly-client-all

protected void sendLocalAddress(Address local_addr) throws Exception {
  try {
    int addr_size=local_addr.serializedSize();
    int expected_size=cookie.length + Global.SHORT_SIZE*2 + addr_size;
    ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(expected_size +2);
    out.write(cookie, 0, cookie.length);
    out.writeShort(Version.version);
    out.writeShort(addr_size); // address size
    local_addr.writeTo(out);
    ByteBuffer buf=out.getByteBuffer();
    send(buf, false);
    updateLastAccessed();
  }
  catch(Exception ex) {
    close();
    throw ex;
  }
}
origin: org.jboss.eap/wildfly-client-all

  protected Buffer writeMessage(final Message msg) throws Exception {
    dos.position(0);
    byte flags=0;
    dos.writeShort(Version.version); // write the version
    if(msg.getDest() == null)
      flags+=(byte)2;
    dos.writeByte(flags);
    msg.writeTo(dos);
    return new Buffer(dos.buffer(), 0, dos.position());
  }
}
origin: org.jboss.eap/wildfly-client-all

protected static Buffer marshal(final View view, final Digest digest) {
  try {
    int expected_size=Global.SHORT_SIZE;
    if(view != null)
      expected_size+=view.serializedSize();
    boolean write_addrs=writeAddresses(view, digest);
    if(digest != null)
      expected_size=(int)digest.serializedSize(write_addrs);
    final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(expected_size +10);
    out.writeShort(determineFlags(view, digest));
    if(view != null)
      view.writeTo(out);
    if(digest != null)
      digest.writeTo(out, write_addrs);
    return out.getBuffer();
  }
  catch(Exception ex) {
    return null;
  }
}
org.jgroups.utilByteArrayDataOutputStreamwriteShort

Popular methods of ByteArrayDataOutputStream

  • <init>
  • buffer
  • checkBounds
  • ensureCapacity
    Grows the buffer; whether it grow linearly or exponentially depends on grow_exponentially
  • getBuffer
  • getByteBuffer
  • position
  • write
  • writeBoolean
  • writeByte
  • writeChar
  • writeInt
  • writeChar,
  • writeInt,
  • writeLong,
  • writeUTF

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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