Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.nio.ByteBuffer;

public class Main {
    public static short getUnsignedByte(final ByteBuffer pByteBuffer) {
        return (short) (pByteBuffer.get() & 0xFF);
    }

    public static short getUnsignedByte(final ByteBuffer pByteBuffer, final int pPosition) {
        return (short) (pByteBuffer.get(pPosition) & (short) 0xFF);
    }
}