Codota Logo
LittleEndianDataInputStream.readAndCheckByte
Code IndexAdd Codota to your IDE (free)

How to use
readAndCheckByte
method
in
com.google.common.io.LittleEndianDataInputStream

Best Java code snippets using com.google.common.io.LittleEndianDataInputStream.readAndCheckByte (Showing top 20 results out of 315)

  • Common ways to obtain LittleEndianDataInputStream
private void myMethod () {
LittleEndianDataInputStream l =
  • Codota IconInputStream in;new LittleEndianDataInputStream(in)
  • Smart code suggestions by Codota
}
origin: google/guava

/**
 * Reads a {@code long} as specified by {@link DataInputStream#readLong()}, except using
 * little-endian byte order.
 *
 * @return the next eight bytes of the input stream, interpreted as a {@code long} in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public long readLong() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 byte b5 = readAndCheckByte();
 byte b6 = readAndCheckByte();
 byte b7 = readAndCheckByte();
 byte b8 = readAndCheckByte();
 return Longs.fromBytes(b8, b7, b6, b5, b4, b3, b2, b1);
}
origin: google/guava

/**
 * Reads an integer as specified by {@link DataInputStream#readInt()}, except using little-endian
 * byte order.
 *
 * @return the next four bytes of the input stream, interpreted as an {@code int} in little-endian
 *     byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readInt() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 return Ints.fromBytes(b4, b3, b2, b1);
}
origin: google/guava

/**
 * Reads an unsigned {@code short} as specified by {@link DataInputStream#readUnsignedShort()},
 * except using little-endian byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an unsigned 16-bit integer in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: google/j2objc

/**
 * Reads a {@code long} as specified by {@link DataInputStream#readLong()}, except using
 * little-endian byte order.
 *
 * @return the next eight bytes of the input stream, interpreted as a {@code long} in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public long readLong() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 byte b5 = readAndCheckByte();
 byte b6 = readAndCheckByte();
 byte b7 = readAndCheckByte();
 byte b8 = readAndCheckByte();
 return Longs.fromBytes(b8, b7, b6, b5, b4, b3, b2, b1);
}
origin: google/j2objc

/**
 * Reads an integer as specified by {@link DataInputStream#readInt()}, except using little-endian
 * byte order.
 *
 * @return the next four bytes of the input stream, interpreted as an {@code int} in little-endian
 *     byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readInt() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 return Ints.fromBytes(b4, b3, b2, b1);
}
origin: wildfly/wildfly

/**
 * Reads a {@code long} as specified by {@link DataInputStream#readLong()}, except using
 * little-endian byte order.
 *
 * @return the next eight bytes of the input stream, interpreted as a {@code long} in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public long readLong() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 byte b5 = readAndCheckByte();
 byte b6 = readAndCheckByte();
 byte b7 = readAndCheckByte();
 byte b8 = readAndCheckByte();
 return Longs.fromBytes(b8, b7, b6, b5, b4, b3, b2, b1);
}
origin: wildfly/wildfly

/**
 * Reads an integer as specified by {@link DataInputStream#readInt()}, except using little-endian
 * byte order.
 *
 * @return the next four bytes of the input stream, interpreted as an {@code int} in little-endian
 *     byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readInt() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 return Ints.fromBytes(b4, b3, b2, b1);
}
origin: google/j2objc

/**
 * Reads an unsigned {@code short} as specified by {@link DataInputStream#readUnsignedShort()},
 * except using little-endian byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an unsigned 16-bit integer in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: wildfly/wildfly

/**
 * Reads an unsigned {@code short} as specified by {@link DataInputStream#readUnsignedShort()},
 * except using little-endian byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an unsigned 16-bit integer in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: org.hudsonci.lib.guava/guava

/**
 * Reads an integer as specified by {@link DataInputStream#readInt()}, except
 * using little-endian byte order.
 *
 * @return the next four bytes of the input stream, interpreted as an 
 *         {@code int} in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readInt() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 return Ints.fromBytes( b4, b3, b2, b1);
}
origin: org.sonatype.sisu/sisu-guava

/**
 * Reads an integer as specified by {@link DataInputStream#readInt()}, except
 * using little-endian byte order.
 *
 * @return the next four bytes of the input stream, interpreted as an 
 *         {@code int} in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readInt() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 byte b3 = readAndCheckByte();
 byte b4 = readAndCheckByte();
 return Ints.fromBytes( b4, b3, b2, b1);
}
origin: org.hudsonci.lib.guava/guava

/**
 * Reads an unsigned {@code short} as specified by
 * {@link DataInputStream#readUnsignedShort()}, except using little-endian
 * byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an 
 *         unsigned 16-bit integer in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Reads an unsigned {@code short} as specified by
 * {@link DataInputStream#readUnsignedShort()}, except using little-endian
 * byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an 
 *         unsigned 16-bit integer in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: com.google.guava/guava-jdk5

/**
 * Reads an unsigned {@code short} as specified by
 * {@link DataInputStream#readUnsignedShort()}, except using little-endian
 * byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an 
 *         unsigned 16-bit integer in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: org.sonatype.sisu/sisu-guava

/**
 * Reads an unsigned {@code short} as specified by
 * {@link DataInputStream#readUnsignedShort()}, except using little-endian
 * byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an 
 *         unsigned 16-bit integer in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Reads an unsigned {@code short} as specified by
 * {@link DataInputStream#readUnsignedShort()}, except using little-endian
 * byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an 
 *         unsigned 16-bit integer in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: com.atlassian.bundles/guava

/**
 * Reads an unsigned {@code short} as specified by
 * {@link DataInputStream#readUnsignedShort()}, except using little-endian
 * byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an {@code
 *         int} in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Reads an unsigned {@code short} as specified by
 * {@link DataInputStream#readUnsignedShort()}, except using little-endian
 * byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an 
 *         unsigned 16-bit integer in little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Reads an unsigned {@code short} as specified by {@link DataInputStream#readUnsignedShort()},
 * except using little-endian byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an unsigned 16-bit integer in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Reads an unsigned {@code short} as specified by {@link DataInputStream#readUnsignedShort()},
 * except using little-endian byte order.
 *
 * @return the next two bytes of the input stream, interpreted as an unsigned 16-bit integer in
 *     little-endian byte order
 * @throws IOException if an I/O error occurs
 */
@CanIgnoreReturnValue // to skip some bytes
@Override
public int readUnsignedShort() throws IOException {
 byte b1 = readAndCheckByte();
 byte b2 = readAndCheckByte();
 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
}
com.google.common.ioLittleEndianDataInputStreamreadAndCheckByte

Javadoc

Reads a byte from the input stream checking that the end of file (EOF) has not been encountered.

Popular methods of LittleEndianDataInputStream

  • readInt
    Reads an integer as specified by DataInputStream#readInt(), except using little-endian byte order.
  • readLong
    Reads a long as specified by DataInputStream#readLong(), except using little-endian byte order.
  • <init>
    Creates a LittleEndianDataInputStream that wraps the given stream.
  • readUnsignedByte
  • readUnsignedShort
    Reads an unsigned short as specified by DataInputStream#readUnsignedShort(), except using little-end
  • readByte
  • close
  • readDouble
    Reads a double as specified by DataInputStream#readDouble(), except using little-endian byte order.
  • readFloat
    Reads a float as specified by DataInputStream#readFloat(), except using little-endian byte order.
  • readShort
    Reads a short as specified by DataInputStream#readShort(), except using little-endian byte order.
  • read
  • readFully
  • read,
  • readFully,
  • readBoolean,
  • readUTF,
  • skip,
  • skipBytes

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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