Codota Logo
ByteArrayDataOutputStream.writeShort
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • onRequestPermissionsResult (Fragment)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • BoxLayout (javax.swing)
  • JList (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now