Java ByteBuffer from Byte Array readByteAsInt(ByteBuffer buffer)

Here you can find the source of readByteAsInt(ByteBuffer buffer)

Description

read Byte As Int

License

Open Source License

Declaration

public static int readByteAsInt(ByteBuffer buffer) throws IOException 

Method Source Code


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

import java.io.IOException;
import java.nio.ByteBuffer;

public class Main {
    public static int readByteAsInt(ByteBuffer buffer) throws IOException {
        return Byte.toUnsignedInt(buffer.get());
    }//from ww w.  j a  va2s  .  c  o m
}

Related

  1. bufToArray(ByteBuffer b)
  2. byteBuffer(byte[] a)
  3. readByteArray(ByteBuffer byteBuffer, int length)
  4. readByteArray(ByteBuffer in)
  5. readByteArray(ByteBuffer logBuf)
  6. readBytes(ByteBuffer bb, int length)
  7. readBytes(ByteBuffer bb, int length)
  8. readBytes(ByteBuffer buf, int length)
  9. readBytes(ByteBuffer buffer)