Java ByteBuffer Read readShortLE(ByteBuffer buf, int i)

Here you can find the source of readShortLE(ByteBuffer buf, int i)

Description

read Short LE

License

Open Source License

Declaration

public static int readShortLE(ByteBuffer buf, int i) 

Method Source Code


//package com.java2s;
/* Partial import of https://github.com/jpountz/lz4-java, Apache 2.0 licensed. */

import java.nio.ByteBuffer;

public class Main {
    public static int readShortLE(ByteBuffer buf, int i) {
        return (buf.get(i) & 0xFF) | ((buf.get(i + 1) & 0xFF) << 8);
    }/*from   w  ww  .  ja  v  a2  s.  c  o  m*/
}

Related

  1. readNewLine(ByteBuffer buf)
  2. readNullTerminatedString(ByteBuffer buf)
  3. readObject(ByteBuffer byteBuffer)
  4. readReal(ByteBuffer bb)
  5. readResBit15(ByteBuffer fromBuffer)
  6. readShortLength(ByteBuffer bb)
  7. readShorts(final ByteBuffer bb, final int length)
  8. readShortString(ByteBuffer buffer)
  9. readSignedVarint(ByteBuffer buffer)