Tabnine Logo
ByteArrayDataInputStream.read
Code IndexAdd Tabnine to your IDE (free)

How to use
read
method
in
org.jgroups.util.ByteArrayDataInputStream

Best Java code snippets using org.jgroups.util.ByteArrayDataInputStream.read (Showing top 20 results out of 315)

origin: wildfly/wildfly

public long readLong() throws IOException {
  return (((long)read() << 56) +
   ((long)(read() & 0xff) << 48) +
   ((long)(read() & 0xff) << 40) +
   ((long)(read() & 0xff) << 32) +
   ((long)(read() & 0xff) << 24) +
   ((read() & 0xff) << 16) +
   ((read() & 0xff) <<  8) +
   ((read() & 0xff) <<  0));
}
origin: wildfly/wildfly

public int read() throws IOException {
  return input.read();
}
origin: wildfly/wildfly

public int readInt() throws IOException {
  int ch1=read();
  int ch2=read();
  int ch3=read();
  int ch4=read();
  if ((ch1 | ch2 | ch3 | ch4) < 0)
    throw new EOFException();
  return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
}
origin: wildfly/wildfly

public int read(byte b[], int off, int len) throws IOException {
  return input.read(b, off, len);
}
origin: wildfly/wildfly

public int readUnsignedShort() throws IOException {
  int ch1=read();
  int ch2=read();
  if ((ch1 | ch2) < 0)
    throw new EOFException();
  return (ch1 << 8) + (ch2 << 0);
}
origin: wildfly/wildfly

public short readShort() throws IOException {
  int ch1=read();
  int ch2=read();
  if ((ch1 | ch2) < 0)
    throw new EOFException();
  return (short)((ch1 << 8) + (ch2 << 0));
}
origin: wildfly/wildfly

public char readChar() throws IOException {
  int ch1=read();
  int ch2=read();
  if ((ch1 | ch2) < 0)
    throw new EOFException();
  return (char)((ch1 << 8) + (ch2 << 0));
}
origin: wildfly/wildfly

public byte readByte() throws IOException {
  int ch=read();
  if (ch < 0)
    throw new EOFException();
  return (byte)(ch);
}
origin: wildfly/wildfly

public boolean readBoolean() throws IOException {
  int ch=read();
  if(ch < 0)
    throw new EOFException();
  return ch != 0;
}
origin: wildfly/wildfly

public int readUnsignedByte() throws IOException {
  int ch=read();
  if (ch < 0)
    throw new EOFException();
  return ch;
}
origin: wildfly/wildfly

public void readFully(byte[] b, int off, int len) throws IOException {
  if (len < 0)
    throw new IndexOutOfBoundsException();
  int n = 0;
  while (n < len) {
    int count=read(b, off + n, len - n);
    if (count < 0)
      throw new EOFException();
    n += count;
  }
}
origin: wildfly/wildfly

public String readLine() throws IOException {
  StringBuilder sb=new StringBuilder(35);
  int ch;
  while(true) {
    ch=read();
    if(ch == -1)
      return sb.length() == 0? null : sb.toString();
    if(ch == '\r')
      ;
    else {
      if(ch == '\n')
        break;
      sb.append((char)ch);
    }
  }
  return sb.toString();
}
origin: org.jboss.eap/wildfly-client-all

public long readLong() throws IOException {
  return (((long)read() << 56) +
   ((long)(read() & 0xff) << 48) +
   ((long)(read() & 0xff) << 40) +
   ((long)(read() & 0xff) << 32) +
   ((long)(read() & 0xff) << 24) +
   ((read() & 0xff) << 16) +
   ((read() & 0xff) <<  8) +
   ((read() & 0xff) <<  0));
}
origin: org.jboss.eap/wildfly-client-all

public int readInt() throws IOException {
  int ch1=read();
  int ch2=read();
  int ch3=read();
  int ch4=read();
  if ((ch1 | ch2 | ch3 | ch4) < 0)
    throw new EOFException();
  return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
}
origin: org.jboss.eap/wildfly-client-all

public byte readByte() throws IOException {
  int ch=read();
  if (ch < 0)
    throw new EOFException();
  return (byte)(ch);
}
origin: org.jboss.eap/wildfly-client-all

public short readShort() throws IOException {
  int ch1=read();
  int ch2=read();
  if ((ch1 | ch2) < 0)
    throw new EOFException();
  return (short)((ch1 << 8) + (ch2 << 0));
}
origin: org.jboss.eap/wildfly-client-all

public char readChar() throws IOException {
  int ch1=read();
  int ch2=read();
  if ((ch1 | ch2) < 0)
    throw new EOFException();
  return (char)((ch1 << 8) + (ch2 << 0));
}
origin: org.jboss.eap/wildfly-client-all

public boolean readBoolean() throws IOException {
  int ch=read();
  if(ch < 0)
    throw new EOFException();
  return ch != 0;
}
origin: org.jboss.eap/wildfly-client-all

public int readUnsignedByte() throws IOException {
  int ch=read();
  if (ch < 0)
    throw new EOFException();
  return ch;
}
origin: org.jboss.eap/wildfly-client-all

public void readFully(byte[] b, int off, int len) throws IOException {
  if (len < 0)
    throw new IndexOutOfBoundsException();
  int n = 0;
  while (n < len) {
    int count=read(b, off + n, len - n);
    if (count < 0)
      throw new EOFException();
    n += count;
  }
}
org.jgroups.utilByteArrayDataInputStreamread

Javadoc

Reads the next byte of data from buf. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the buffer has been reached, the value -1 is returned.

Popular methods of ByteArrayDataInputStream

  • <init>
  • checkBounds
  • limit
  • position
  • readByte
  • readFully
  • readInt
  • readLong
  • readShort
  • readUnsignedShort
  • skipBytes
  • skipBytes

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JButton (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best plugins for Eclipse
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