Java ByteBuffer Get getSmartOld(ByteBuffer in)

Here you can find the source of getSmartOld(ByteBuffer in)

Description

get Smart Old

License

Open Source License

Declaration

public static int getSmartOld(ByteBuffer in) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;

public class Main {
    public static int getSmartOld(ByteBuffer in) {
        int value = in.get() & 0xff;
        if (value < 128)
            return value;
        value = value << 8;/*  w ww . j a  va 2  s.  c  o m*/
        value += (in.get() & 0xff);
        return value - 32768;
    }
}

Related

  1. getShiftedI32(final int bytesPerPixel, final ByteBuffer data, final boolean retainDataPos)
  2. getSize(int size, ByteBuffer buffer)
  3. getSizePrefix(ByteBuffer bb)
  4. getSmallSmartInt(ByteBuffer buffer)
  5. getSmart(ByteBuffer buf)
  6. getSurrogateKey(byte[] data, ByteBuffer buffer)
  7. getTableUuid(ByteBuffer rowKey)
  8. getTempByteBuffer()
  9. getTerminatedArray(ByteBuffer buf)